3v4l.org

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

Function pre_inc:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/a5Fmk
function name:  pre_inc
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        PRE_INC                                          ~1      !0
          2      > RETURN_BY_REF                                            ~1
    5     3*     > RETURN_BY_REF                                            null

End of function pre_inc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.9 ms | 1397 KiB | 14 Q