3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; // Your case function b() { $a = 4; return true; } // Passing by reference function c(&$d) { $d = 5; return true; } // Using return function d($d) { $d = 6; return $d; } b(); var_dump($a); c($a); var_dump($a); $a = d($a); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXFdR
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
   21     1        INIT_FCALL                                               'b'
          2        DO_FCALL                                      0          
   22     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   24     6        INIT_FCALL                                               'c'
          7        SEND_REF                                                 !0
          8        DO_FCALL                                      0          
   25     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   27    12        INIT_FCALL                                               'd'
         13        SEND_VAR                                                 !0
         14        DO_FCALL                                      0  $6      
         15        ASSIGN                                                   !0, $6
   28    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXFdR
function name:  b
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 4
    8     1      > RETURN                                                   <true>
    9     2*     > RETURN                                                   null

End of function b

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXFdR
function name:  c
number of ops:  4
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN                                                   !0, 5
   13     2      > RETURN                                                   <true>
   14     3*     > RETURN                                                   null

End of function c

Function d:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXFdR
function name:  d
number of ops:  4
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        ASSIGN                                                   !0, 6
   18     2      > RETURN                                                   !0
   19     3*     > RETURN                                                   null

End of function d

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.82 ms | 1001 KiB | 17 Q