3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = " [ \"JSON Test Pattern pass1\", {\"object with 1 member\":[\"array with 1 element\"]}, {}, [], -42, true, false, null, { \"integer\": 1234567890, \"real\": -9876.543210, \"e\": 0.123456789e-12, \"E\": 1.234567890E+34, \"\": 23456789012E666, \"E no .\": 4E12, \"zero\": 0, \"one\": 1, \"space\": \" \", \"quote\": \"\\\"\", \"backslash\": \"\\\\\", \"controls\": \"\\b\\f\\n\\r\\t\", \"slash\": \"/ & \\/\", \"alpha\": \"abcdefghijklmnopqrstuvwyz\", \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWYZ\", \"digit\": \"0123456789\", \"special\": \"`1~!@#$%^&*()_+-={':[,]}|;.</>?\", \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\", \"unicode\": \"\\u30d7\\u30ec\\u30b9\\u30ad\\u30c3\\u30c8\", \"プレスキット\": \"プレスキット\", \"empty_string\": \"\", \"true\": true, \"false\": false, \"null\": null, \"array\":[ ], \"object\":{ }, \"123\":{\"456\":{\"abc\":{\"789\":\"def\",\"012\":[1,2,\"5\",500],\"ghi\":[1,2,\"five\",50,\"sixty\"]}}}, \"address\": \"50 St. James Street\", \"url\": \"http://www.JSON.org/\", \"comment\": \"// /* <!-- --\", \"# -- --> */\": \" \", \" s p a c e d \" :[1,2 , 3 , 4 , 5 , 6 ,7 ], \"compact\": [1,2,3,4,5,6,7], \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\", \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\", \"\\/\\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?\" : \"A key can be any string\" }, 0.5 ,98.6 , 99.44 , 1066 ,\"rosebud\"] "; $res = json_decode($test, true); if (json_last_error() != JSON_ERROR_NONE) { die(json_last_error_msg()); } var_dump($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UbgJs
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A%5B%0A++++%22JSON+Test+Pattern+pass1%22%2C%0A++++%7B%22object+with+1+member%22%3A%5B%22array+with+1+element%22%5D%7D%2C%0A++++%7B%7D%2C%0A++++%5B%5D%2C%0A++++-42%2C%0A++++true%2C%0A++++false%2C%0A++++null%2C%0A++++%7B%0A++++++++%22integer%22%3A+1234567890%2C%0A++++++++%22real%22%3A+-9876.543210%2C%0A++++++++%22e%22%3A+0.123456789e-12%2C%0A++++++++%22E%22%3A+1.234567890E%2B34%2C%0A++++++++%22%22%3A++23456789012E666%2C%0A++++++++%22E+no+.%22%3A++4E12%2C%0A++++++++%22zero%22%3A+0%2C%0A++++++++%22one%22%3A+1%2C%0A++++++++%22space%22%3A+%22+%22%2C%0A++++++++%22quote%22%3A+%22%5C%22%22%2C%0A++++++++%22backslash%22%3A+%22%5C%5C%22%2C%0A++++++++%22controls%22%3A+%22%5Cb%5Cf%5Cn%5Cr%5Ct%22%2C%0A++++++++%22slash%22%3A+%22%2F+%26+%5C%2F%22%2C%0A++++++++%22alpha%22%3A+%22abcdefghijklmnopqrstuvwyz%22%2C%0A++++++++%22ALPHA%22%3A+%22ABCDEFGHIJKLMNOPQRSTUVWYZ%22%2C%0A++++++++%22digit%22%3A+%220123456789%22%2C%0A++++++++%22special%22%3A+%22%601%7E%21%40%23%24%25%5E%26%2A%28%29_%2B-%3D%7B%27%3A%5B%2C%5D%7D%7C%3B.%3C%2F%3E%3F%22%2C%0A++++++++%22hex%22%3A+%22%5Cu0123%5Cu4567%5Cu89AB%5CuCDEF%5Cuabcd%5Cuef4A%22%2C%0A++++++++%22unicode%22%3A+%22%5Cu30d7%5Cu30ec%5Cu30b9%5Cu30ad%5Cu30c3%5Cu30c8%22%2C%0A++++++++%22%E3%83%97%E3%83%AC%E3%82%B9%E3%82%AD%E3%83%83%E3%83%88%22%3A+%22%E3%83%97%E3%83%AC%E3%82%B9%E3%82%AD%E3%83%83%E3%83%88%22%2C%0A++++++++%22empty_string%22%3A+%22%22%2C%0A++++++++%22true%22%3A+true%2C%0A++++++++%22false%22%3A+false%2C%0A++++++++%22null%22%3A+null%2C%0A++++++++%22array%22%3A%5B++%5D%2C%0A++++++++%22object%22%3A%7B++%7D%2C%0A++++++++%22123%22%3A%7B%22456%22%3A%7B%22abc%22%3A%7B%22789%22%3A%22def%22%2C%22012%22%3A%5B1%2C2%2C%225%22%2C500%5D%2C%22ghi%22%3A%5B1%2C2%2C%22five%22%2C50%2C%22sixty%22%5D%7D%7D%7D%2C%0A++++++++%22address%22%3A+%2250+St.+James+Street%22%2C%0A++++++++%22url%22%3A+%22http%3A%2F%2Fwww.JSON.org%2F%22%2C%0A++++++++%22comment%22%3A+%22%2F%2F+%2F%2A+%3C%21--+--%22%2C%0A++++++++%22%23+--+--%3E+%2A%2F%22%3A+%22+%22%2C%0A++++++++%22+s+p+a+c+e+d+%22+%3A%5B1%2C2+%2C+3%0A%2C%0A4+%2C+5++++++++%2C++++++++++6+++++++++++%2C7++++++++%5D%2C%0A++++++++%22compact%22%3A+%5B1%2C2%2C3%2C4%2C5%2C6%2C7%5D%2C%0A++++++++%22jsontext%22%3A+%22%7B%5C%22object+with+1+member%5C%22%3A%5B%5C%22array+with+1+element%5C%22%5D%7D%22%2C%0A++++++++%22quotes%22%3A+%22%26%2334%3B+%5Cu0022+%2522+0x22+034+%26%23x22%3B%22%2C%0A++++++++%22%5C%2F%5C%5C%5C%22%5CuCAFE%5CuBABE%5CuAB98%5CuFCDE%5Cubcda%5Cuef4A%5Cb%5Cf%5Cn%5Cr%5Ct%601%7E%21%40%23%24%25%5E%26%2A%28%29_%2B-%3D%5B%5D%7B%7D%7C%3B%3A%27%2C.%2F%3C%3E%3F%22%0A%3A+%22A+key+can+be+any+string%22%0A++++%7D%2C%0A++++0.5+%2C98.6%0A%2C%0A99.44%0A%2C%0A1066%0A%2C%22rosebud%22%5D%0A'
   62     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   64     6        INIT_FCALL                                               'json_last_error'
          7        DO_ICALL                                         $5      
          8        IS_NOT_EQUAL                                             $5, 0
          9      > JMPZ                                                     ~6, ->13
   65    10    >   INIT_FCALL                                               'json_last_error_msg'
         11        DO_ICALL                                         $7      
         12      > EXIT                                                     $7
   68    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.91 ms | 1400 KiB | 21 Q