3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b=array(-1=>0); $c=array_pop($b); assert($c == 0); assert(array_push($b, 0), 1); assert(array_push($b, 0), 2); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AUjvW
function name:  (null)
number of ops:  33
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_pop'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
          5        ASSERT_CHECK                                             
          6        INIT_FCALL                                               'assert'
          7        IS_EQUAL                                         ~5      !1, 0
          8        SEND_VAL                                                 ~5
          9        SEND_VAL                                                 'assert%28%24c+%3D%3D+0%29'
         10        DO_ICALL                                                 
    5    11        ASSERT_CHECK                                             
         12        INIT_FCALL                                               'assert'
         13        INIT_FCALL                                               'array_push'
         14        SEND_REF                                                 !0
         15        SEND_VAL                                                 0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        SEND_VAL                                                 1
         19        DO_ICALL                                                 
    6    20        ASSERT_CHECK                                             
         21        INIT_FCALL                                               'assert'
         22        INIT_FCALL                                               'array_push'
         23        SEND_REF                                                 !0
         24        SEND_VAL                                                 0
         25        DO_ICALL                                         $9      
         26        SEND_VAR                                                 $9
         27        SEND_VAL                                                 2
         28        DO_ICALL                                                 
    7    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.35 ms | 1396 KiB | 21 Q