3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[ { "name": "Top Level", "parent": "null", "children": [ { "name": "Level 2: A", "parent": "Top Level", "children": [ { "name": "Son of A", "parent": "Level 2: A" }, { "name": "Daughter of A", "parent": "Level 2: A" } ] }, { "name": "Level 2: B", "parent": "Top Level", "children": [ { "name": "Son of B", "parent": "Level 2: B" }, { "name": "Daughter of B", "parent": "Level 2:B" } ] } ] } ]'; print_r(json_decode($str, true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vGX4M
function name:  (null)
number of ops:  9
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%0A++%7B%0A++++%22name%22%3A+%22Top+Level%22%2C%0A++++%22parent%22%3A+%22null%22%2C%0A++++%22children%22%3A+%5B%0A++++++%7B%0A++++++++%22name%22%3A+%22Level+2%3A+A%22%2C%0A++++++++%22parent%22%3A+%22Top+Level%22%2C%0A++++++++%22children%22%3A+%5B%0A++++++++++%7B%0A++++++++++++%22name%22%3A+%22Son+of+A%22%2C%0A++++++++++++%22parent%22%3A+%22Level+2%3A+A%22%0A++++++++++%7D%2C%0A++++++++++%7B%0A++++++++++++%22name%22%3A+%22Daughter+of+A%22%2C%0A++++++++++++%22parent%22%3A+%22Level+2%3A+A%22%0A++++++++++%7D%0A++++++++%5D%0A++++++%7D%2C%0A++++++%7B%0A++++++++%22name%22%3A+%22Level+2%3A+B%22%2C%0A++++++++%22parent%22%3A+%22Top+Level%22%2C%0A+++++++++%22children%22%3A+%5B%0A++++++++++%7B%0A++++++++++++%22name%22%3A+%22Son+of+B%22%2C%0A++++++++++++%22parent%22%3A+%22Level+2%3A+B%22%0A++++++++++%7D%2C%0A++++++++++%7B%0A++++++++++++%22name%22%3A+%22Daughter+of+B%22%2C%0A++++++++++++%22parent%22%3A+%22Level+2%3AB%22%0A++++++++++%7D%0A++++++++%5D%0A++++++%7D%0A++++%5D%0A++%7D%0A%5D'
   40     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.97 ms | 940 KiB | 18 Q