3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add(&$var){ // The &amp; is before the argument $var $var++; } $a = 1; $b = 10; add($a); echo "a is $a,"; add($b); echo " a is $a, and b is $b"; // Note: $a and $b are NOT referenced
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ArBLP
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 1
    7     1        ASSIGN                                                   !1, 10
    8     2        INIT_FCALL                                               'add'
          3        SEND_REF                                                 !0
          4        DO_FCALL                                      0          
    9     5        ROPE_INIT                                     3  ~6      'a+is+'
          6        ROPE_ADD                                      1  ~6      ~6, !0
          7        ROPE_END                                      2  ~5      ~6, '%2C'
          8        ECHO                                                     ~5
   10     9        INIT_FCALL                                               'add'
         10        SEND_REF                                                 !1
         11        DO_FCALL                                      0          
   11    12        ROPE_INIT                                     4  ~10     '+a+is+'
         13        ROPE_ADD                                      1  ~10     ~10, !0
         14        ROPE_ADD                                      2  ~10     ~10, '%2C+and+b+is+'
         15        ROPE_END                                      3  ~9      ~10, !1
         16        ECHO                                                     ~9
         17      > RETURN                                                   1

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ArBLP
function name:  add
number of ops:  3
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        PRE_INC                                                  !0
    5     2      > RETURN                                                   null

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.7 ms | 1397 KiB | 15 Q