3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function foo($x, &$y) { $y = $x ** 2; return $x * 2; } $a = 100; var_dump([foo(5, $a), $a]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IdZbr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 100
   12     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'foo'
          3        SEND_VAL                                                 5
          4        SEND_REF                                                 !0
          5        DO_FCALL                                      0  $2      
          6        INIT_ARRAY                                       ~3      $2
          7        ADD_ARRAY_ELEMENT                                ~3      !0
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IdZbr
function name:  foo
number of ops:  7
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        POW                                              ~2      !0, 2
          3        ASSIGN                                                   !1, ~2
    7     4        MUL                                              ~4      !0, 2
          5      > RETURN                                                   ~4
    8     6*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.21 ms | 999 KiB | 15 Q