3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c { var $v = ''; } function cf($c, $v) { $c->v = $v; } $c = new c(); $c1 = clone $c; cf($c, '123'); var_dump($c); var_dump($c1); //output php5 //output php4, fix capbility, fix output to '123'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gGRbh
function name:  (null)
number of ops:  16
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        CLONE                                            ~5      !0
          4        ASSIGN                                                   !1, ~5
   14     5        INIT_FCALL                                               'cf'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '123'
          8        DO_FCALL                                      0          
   16     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   18    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   21    15      > RETURN                                                   1

Function cf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gGRbh
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:
148.7 ms | 1402 KiB | 16 Q