3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $a = 1; $b = &$a; echo (++$a)+ (++$a) + (++$a); } function bar() { $a = 1; echo (++$a)+ (++$a) + (++$a); } foo(); bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GDksr
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   15     2        INIT_FCALL                                               'bar'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GDksr
function name:  bar
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 1
   11     1        PRE_INC                                          ~2      !0
          2        PRE_INC                                          ~3      !0
          3        ADD                                              ~4      ~2, ~3
          4        PRE_INC                                          ~5      !0
          5        ADD                                              ~6      ~4, ~5
          6        ECHO                                                     ~6
   12     7      > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.74 ms | 1389 KiB | 15 Q