3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AClass { public static $prop = "Hi"; } function assignRef (&$ref) { $ref = "hi";//&AClass::$prop; echo "inside assignRef: $ref\n"; } $ref = "Hello"; echo "outside: $ref\n"; assignRef($ref); echo "outside: $ref\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EhqBp
function name:  (null)
number of ops:  13
compiled vars:  !0 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Hello'
   12     1        ROPE_INIT                                     3  ~3      'outside%3A+'
          2        ROPE_ADD                                      1  ~3      ~3, !0
          3        ROPE_END                                      2  ~2      ~3, '%0A'
          4        ECHO                                                     ~2
   13     5        INIT_FCALL                                               'assignref'
          6        SEND_REF                                                 !0
          7        DO_FCALL                                      0          
   14     8        ROPE_INIT                                     3  ~7      'outside%3A+'
          9        ROPE_ADD                                      1  ~7      ~7, !0
         10        ROPE_END                                      2  ~6      ~7, '%0A'
         11        ECHO                                                     ~6
         12      > RETURN                                                   1

Function assignref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EhqBp
function name:  assignRef
number of ops:  7
compiled vars:  !0 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !0, 'hi'
    9     2        ROPE_INIT                                     3  ~3      'inside+assignRef%3A+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
   10     6      > RETURN                                                   null

End of function assignref

Class AClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.4 ms | 1397 KiB | 14 Q