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); assert(array_push($b, 0), 3); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A8RAG
function name:  (null)
number of ops:  42
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     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                                                 
    6    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                                                 
    7    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                                                 
    8    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
    9    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                                                 
   10    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.28 ms | 1396 KiB | 21 Q