3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $js='{ "code": 1, "page": { "totalpage": 20, "count":10, "curr":1, "totalcount": 180 }, "data": [{ "id":3, "name":"jennifer" "age": 23, "sex": "female" },{ "id":5, "name":"lenbo" "age": 21, "sex": "male" }] }'; $arr=[['name'=>[3,'age'=>4],2],[3,'age'=>4]]; echo json_encode($arr); $test1 = 123; $test2 = 123; function get_variable_name(&$var, $scope = NULL) { if (NULL == $scope) { $scope = $GLOBALS; } $tmp = $var; echo $var = "tmp_exists_" . mt_rand(); $name = array_search($var, $scope, TRUE); $var = $tmp; return $name; } echo get_variable_name($test1)."\n"; echo get_variable_name($test2);//var_dump($GLOBALS);
Output for 7.1.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1939437357 tmp_exists_428556856
Output for 7.0.14
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_98405678 tmp_exists_719399570
Output for 7.0.9
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1160134890 tmp_exists_1100750561
Output for 7.0.8
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_913749375 tmp_exists_1903501880
Output for 7.0.7
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_813446359 tmp_exists_1339635008
Output for 7.0.6
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1784002715 tmp_exists_1499795757
Output for 7.0.5
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1595960855 tmp_exists_2001488445
Output for 7.0.4
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_357237023 tmp_exists_2047975812
Output for 7.0.3
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1616001235 tmp_exists_1236910941
Output for 7.0.2
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1766452808 tmp_exists_57384432
Output for 7.0.1
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1509455648 tmp_exists_280192345
Output for 7.0.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_962995776 tmp_exists_1180291981
Output for hhvm-3.12.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1935509630test1 tmp_exists_1504458681test2
Output for hhvm-3.10.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2052702334test1 tmp_exists_1325744836test2
Output for 5.6.28
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1526621433test1 tmp_exists_1483148525test2
Output for 5.6.24
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1835662889test1 tmp_exists_2137906697test2
Output for 5.6.23
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_339186436test1 tmp_exists_1001725520test2
Output for 5.6.22
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1452698296test1 tmp_exists_1355916956test2
Output for 5.6.21
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1763566274test1 tmp_exists_1341854199test2
Output for 5.6.20
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1197421602test1 tmp_exists_2101538141test2
Output for 5.6.19
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1879294461test1 tmp_exists_1781115106test2
Output for 5.6.18
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1163060104test1 tmp_exists_1587790697test2
Output for 5.6.17
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2070267426test1 tmp_exists_733407982test2
Output for 5.6.16
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_253676718test1 tmp_exists_2055254239test2
Output for 5.6.15
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_756753722test1 tmp_exists_204620185test2
Output for 5.6.14
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1252234066test1 tmp_exists_695767988test2
Output for 5.6.13
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_484570946test1 tmp_exists_1015402125test2
Output for 5.6.12
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_825758386test1 tmp_exists_1340022135test2
Output for 5.6.11
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1361401046test1 tmp_exists_1511861642test2
Output for 5.6.10
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_293185354test1 tmp_exists_830359452test2
Output for 5.6.9
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1757275796test1 tmp_exists_347766247test2
Output for 5.6.8
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1768776782test1 tmp_exists_1328308333test2
Output for 5.6.7
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_11309938test1 tmp_exists_865157121test2
Output for 5.6.6
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1258594081test1 tmp_exists_939888345test2
Output for 5.6.5
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1044978220test1 tmp_exists_2077312395test2
Output for 5.6.4
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_328980868test1 tmp_exists_801875017test2
Output for 5.6.3
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_193625647test1 tmp_exists_1550630393test2
Output for 5.6.2
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2054131394test1 tmp_exists_1726770107test2
Output for 5.6.1
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1243695353test1 tmp_exists_1530657219test2
Output for 5.6.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1488456831test1 tmp_exists_1260084086test2
Output for 5.5.38
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_866947788test1 tmp_exists_2093472455test2
Output for 5.5.37
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1729444351test1 tmp_exists_1659867228test2
Output for 5.5.36
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_128799973test1 tmp_exists_340823151test2
Output for 5.5.35
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1252660627test1 tmp_exists_717539625test2
Output for 5.5.34
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1557675095test1 tmp_exists_1752677955test2
Output for 5.5.33
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1493244136test1 tmp_exists_957976384test2
Output for 5.5.32
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1570864001test1 tmp_exists_418345316test2
Output for 5.5.31
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1585167434test1 tmp_exists_1885854660test2
Output for 5.5.30
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_514979382test1 tmp_exists_1820275271test2
Output for 5.5.29
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1797362757test1 tmp_exists_897261804test2
Output for 5.5.28
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1153238661test1 tmp_exists_1745002283test2
Output for 5.5.27
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1330195124test1 tmp_exists_1566175000test2
Output for 5.5.26
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_387303523test1 tmp_exists_558708587test2
Output for 5.5.25
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_720973600test1 tmp_exists_2064396181test2
Output for 5.5.24
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1758082875test1 tmp_exists_645103777test2
Output for 5.5.23
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_728090273test1 tmp_exists_2087330606test2
Output for 5.5.22
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_51836753test1 tmp_exists_2066697841test2
Output for 5.5.21
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_208417927test1 tmp_exists_187974638test2
Output for 5.5.20
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_714452323test1 tmp_exists_1497494422test2
Output for 5.5.19
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2087419499test1 tmp_exists_1877142522test2
Output for 5.5.18
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2100285231test1 tmp_exists_1931835087test2
Output for 5.5.16
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1361434998test1 tmp_exists_133053588test2
Output for 5.5.15
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_702845358test1 tmp_exists_658786524test2
Output for 5.5.14
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_90859982test1 tmp_exists_980706079test2
Output for 5.5.13
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_523895222test1 tmp_exists_1938381163test2
Output for 5.5.12
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1849923854test1 tmp_exists_335325259test2
Output for 5.5.11
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1151729895test1 tmp_exists_1359496682test2
Output for 5.5.10
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_181756613test1 tmp_exists_7008218test2
Output for 5.5.9
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1272837161test1 tmp_exists_526712217test2
Output for 5.5.8
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_955160934test1 tmp_exists_1786793532test2
Output for 5.5.7
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1055951512test1 tmp_exists_139846907test2
Output for 5.5.6
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_971479317test1 tmp_exists_1945664736test2
Output for 5.5.5
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_283103589test1 tmp_exists_108958890test2
Output for 5.5.4
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1070335917test1 tmp_exists_1596005072test2
Output for 5.5.3
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_476333504test1 tmp_exists_709735415test2
Output for 5.5.2
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1674420352test1 tmp_exists_970520645test2
Output for 5.5.1
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_294258789test1 tmp_exists_880374330test2
Output for 5.5.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_945325817test1 tmp_exists_1395381528test2
Output for 5.4.45
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_235571369test1 tmp_exists_1627819744test2
Output for 5.4.44
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1362980801test1 tmp_exists_1011971510test2
Output for 5.4.43
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1448987908test1 tmp_exists_595706347test2
Output for 5.4.42
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_713837166test1 tmp_exists_728814894test2
Output for 5.4.41
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1896238865test1 tmp_exists_1675992094test2
Output for 5.4.40
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1685060936test1 tmp_exists_845723442test2
Output for 5.4.39
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1427895151test1 tmp_exists_120927515test2
Output for 5.4.38
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1790621638test1 tmp_exists_1608910554test2
Output for 5.4.37
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_544473998test1 tmp_exists_1489360333test2
Output for 5.4.36
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1064291957test1 tmp_exists_199086444test2
Output for 5.4.35
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_530393192test1 tmp_exists_1376377433test2
Output for 5.4.34
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1330988480test1 tmp_exists_1099886254test2
Output for 5.4.32
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_574770896test1 tmp_exists_1593137614test2
Output for 5.4.31
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1457444628test1 tmp_exists_1405094616test2
Output for 5.4.30
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2364542test1 tmp_exists_270030738test2
Output for 5.4.29
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1564666220test1 tmp_exists_506462184test2
Output for 5.4.28
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2034777715test1 tmp_exists_1009952377test2
Output for 5.4.27
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_496761320test1 tmp_exists_199302923test2
Output for 5.4.26
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1832855870test1 tmp_exists_779722151test2
Output for 5.4.25
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1836936841test1 tmp_exists_269227951test2
Output for 5.4.24
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_92235107test1 tmp_exists_399890312test2
Output for 5.4.23
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_746014930test1 tmp_exists_1241601848test2
Output for 5.4.22
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_173629977test1 tmp_exists_1055035651test2
Output for 5.4.21
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_591608282test1 tmp_exists_1412490659test2
Output for 5.4.20
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_53990799test1 tmp_exists_6638052test2
Output for 5.4.19
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_384993191test1 tmp_exists_446505628test2
Output for 5.4.18
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1624408815test1 tmp_exists_1180159277test2
Output for 5.4.17
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2099960761test1 tmp_exists_2055643080test2
Output for 5.4.16
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1328808199test1 tmp_exists_1459387909test2
Output for 5.4.15
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_950746742test1 tmp_exists_739048648test2
Output for 5.4.14
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_2067767974test1 tmp_exists_1939098497test2
Output for 5.4.13
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_39573424test1 tmp_exists_455994804test2
Output for 5.4.12
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_243807760test1 tmp_exists_1810282708test2
Output for 5.4.11
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_336261110test1 tmp_exists_302874652test2
Output for 5.4.10
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_949981182test1 tmp_exists_1822038233test2
Output for 5.4.9
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1068911302test1 tmp_exists_1814757737test2
Output for 5.4.8
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_441989846test1 tmp_exists_2134635289test2
Output for 5.4.7
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_450020428test1 tmp_exists_2116445811test2
Output for 5.4.6
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1528286069test1 tmp_exists_633675226test2
Output for 5.4.5
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_264752996test1 tmp_exists_1355042927test2
Output for 5.4.4
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_262237983test1 tmp_exists_73225639test2
Output for 5.4.3
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1086435775test1 tmp_exists_802728067test2
Output for 5.4.2
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1713233169test1 tmp_exists_240598872test2
Output for 5.4.1
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_502465844test1 tmp_exists_1094149876test2
Output for 5.4.0
[{"name":{"0":3,"age":4},"0":2},{"0":3,"age":4}]tmp_exists_1301440080test1 tmp_exists_1085033982test2
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/phVls on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/phVls on line 24
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/phVls on line 24
Process exited with code 255.