3v4l.org

run code in 500+ 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); assert(array_push($b, 0), 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MPaIr
function name:  (null)
number of ops:  42
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                                                     
    8    32        ASSERT_CHECK                                                 
         33        INIT_FCALL                                                   'assert'
         34        INIT_FCALL                                                   'array_push'
         35        SEND_REF                                                     !0
         36        SEND_VAL                                                     0
         37        DO_ICALL                                             $12     
         38        SEND_VAR                                                     $12
         39        SEND_VAL                                                     3
         40        DO_ICALL                                                     
         41      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.12 ms | 2728 KiB | 17 Q