3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c { var $v = 'none'; } function cf(&$c, $v) { $c->v = $v; } $c = new c(); $c1 = $c; cf($c, '123'); var_dump($c); var_dump($c1); //output php5 //php5 fix output $c1 to '123', $c2 to 'none' //output php4, fix capbility //php4 fix output $c1 to '123', $c2 to 'none'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cmNPq
function name:  (null)
number of ops:  15
compiled vars:  !0 = $c, !1 = $c1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'c'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        ASSIGN                                                   !1, !0
   14     4        INIT_FCALL                                               'cf'
          5        SEND_REF                                                 !0
          6        SEND_VAL                                                 '123'
          7        DO_FCALL                                      0          
   16     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   18    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   23    14      > RETURN                                                   1

Function cf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cmNPq
function name:  cf
number of ops:  5
compiled vars:  !0 = $c, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        ASSIGN_OBJ                                               !0, 'v'
          3        OP_DATA                                                  !1
   10     4      > RETURN                                                   null

End of function cf

Class c: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.33 ms | 1397 KiB | 16 Q