3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getA() { return "1"; } $a = &getA(); $b = &$a; $b = "2"; echo $a.'-'.$b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6N9g
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'geta'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN_REF                                               !0, $2
    8     3        ASSIGN_REF                                               !1, !0
   10     4        ASSIGN                                                   !1, '2'
   12     5        CONCAT                                           ~6      !0, '-'
          6        CONCAT                                           ~7      ~6, !1
          7        ECHO                                                     ~7
          8      > RETURN                                                   1

Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6N9g
function name:  getA
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   '1'
    6     1*     > RETURN                                                   null

End of function geta

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.03 ms | 1396 KiB | 14 Q