3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$a) { if (mt_rand(0, 1)) { $a = 10; } var_dump($a); } $x = 5; foo($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6f20
function name:  (null)
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 5
   11     1        INIT_FCALL                                               'foo'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/s6f20
function name:  foo
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'mt_rand'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $1      
          5      > JMPZ                                                     $1, ->7
    5     6    >   ASSIGN                                                   !0, 10
    7     7    >   INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    8    10      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.32 ms | 1397 KiB | 18 Q