3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $p = json_encode(array('Foo', array('baz' => 14, 45 => 'Bar'))); $s = json_decode($p, true); echo array_unshift($s); print_r($s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P5MVn
function name:  (null)
number of ops:  18
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        ASSIGN                                           ~3      !0, $2
          4        ECHO                                                     ~3
    4     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    5    10        INIT_FCALL                                               'array_unshift'
         11        SEND_REF                                                 !1
         12        DO_ICALL                                         $6      
         13        ECHO                                                     $6
    6    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.66 ms | 1394 KiB | 21 Q