3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $p = json_encode(array('Foo', array('baz' => 14, 45 => 'Bar')))."\n"; $s = json_decode($p, true); echo array_shift($s); print_r($s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FjiKq
function name:  (null)
number of ops:  19
compiled vars:  !0 = $p, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $2      
          3        CONCAT                                           ~3      $2, '%0A'
          4        ASSIGN                                           ~4      !0, ~3
          5        ECHO                                                     ~4
    4     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    5    11        INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !1
         13        DO_ICALL                                         $7      
         14        ECHO                                                     $7
    6    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.83 ms | 1394 KiB | 21 Q