кодесурса
«php.js

php.js: функция get_defined_vars ()

script1adsense2code
script1adsense3code

функция get_defined_vars ()

Функция get_defined_vars () возвращает ассоциативный массив определенных на данный момент переменных.

Версия:

1103.1210

Синтаксис:

 get_defined_vars ()

Пример функции php.js get_defined_vars ()

В следующем веб-документе функция get_defined_vars () возвращает массив всех определенных на данный момент переменных.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>php.js : get_defined_vars() function example</title>
<script type="text/javascript" src="../../phpjs/variable/variable.min.js"> </script>
</head>
<body>
<h1 style="color: green">php.js : get_defined_vars() function example</h1>
<h3>Names and values of all currently defined variable names.</h3>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[
print_r(get_defined_vars());
//]]>
</script>
</body>
</html>

Вывод функции:

 Array ([0] => addEventListener [1] => location [2] => navigator [3] => window [4] => 
var_export [5] => var_dump [6] => utf8_encode [7] => utf8_decode [8] => unserialize [9] =>
strval [10] => settype [11] => serialize [12] => print_r [13] => isset [14] =>
is_unicode [15] => is_string [16] => is_scalar [17] => is_resource [18] => is_real [19] =>
is_object [20] => is_numeric [21] => is_null [22] => is_long [23] => is_integer [24] =>
is_int [25] => is_float [26] => is_double [27] => is_callable [28] => is_buffer [29] =
> is_bool [30] => is_binary [31] => is_array [32] => intval [33] => import_request_variables
[34] => gettype [35] => get_resource_type [36] => get_defined_vars [37] => floatval [38] =
> empty [39] => echo [40] => doubleval [41] => document [42] => netscape [43] =>
XPCSafeJSObjectWrapper [44] => XPCNativeWrapper [45] => Компоненты [46] => sessionStorage [47] =>
globalStorage [48] => getComputedStyle [49] => dispatchEvent [50] => removeEventListener [51] =
> parent [52] => top [53] => dump [54] => getSelection [55] => scrollByLines [56] =>
полосы прокрутки [57] => scrollTo [58] => scrollBy [59] => scrollByPages [60] => sizeToContent [61] => setTimeout [62] => setInterval [63] => clearTimeout [64] => clearInterval [ 65] =>
setResizable [66] => captureEvents [67] => releaseEvents [68] => routeEvent [69] =>
enableExternalCapture [70] => disableExternalCapture [71] => открыть [72] => openDialog [73] => кадры
[74] => applicationCache [75] => self [76] => screen [77] => history [78] => content
[79] => menubar [80] => панель инструментов [81] => адресная строка [82] => персональная панель [83] => строка состояния
[84] => каталоги [85] => crypto [86] => контроллеры [87] => новичок [88] => innerWidth
[89] => innerHeight [90] => outerWidth [91] => outerHeight [92] => screenX [93] => screenY
[94] => mozInnerScreenY [95] => предупреждение [96] => подтверждение [97] => приглашение [98] => фокус [99] => размытие [100] => назад [101] => вперед [102 ] => home [103] => stop [104] => печать
[105] => moveTo [106] => moveBy [107] => resizeTo [108] => resizeBy [109] => scroll [110] => close [111] => updateCommands [112] => find [113 ] => atob [114] => btoa [115] => showModalDialog [116] => postMessage [117] => localStorage [118] => QueryInterface [119] => имя
[120] => scrollX [121] => scrollY [122] => закрыто [123] => состояние [124] => defaultStatus
[125] => mozInnerScreenX [126] => pageXOffset [127] => pageYOffset [128] => scrollMaxX [129] => scrollMaxY [130] => length [131] => fullScreen)

Посмотреть пример функции php.js get_defined_vars () в браузере

Скачать phpjs.zip

Предыдущая: php.js: функция floatval ()
Далее: функция php.js: get_resource_type ()

Новый контент: Composer: менеджер зависимостей для PHP , R программирования


script1adsense4code
script1adsense5code
disqus2code
script1adsense6code
script1adsense7code
script1adsense8code
buysellads2code