3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar($x) { echo __METHOD__, "(", $x, ")\n"; return $this; } } $a = (new Foo)->bar(1); $b = (clone $a)->bar(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DdoDH
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $2, 'bar'
          3        SEND_VAL_EX                                              1
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
   10     6        CLONE                                            ~6      !0
          7        INIT_METHOD_CALL                                         ~6, 'bar'
          8        SEND_VAL_EX                                              2
          9        DO_FCALL                                      0  $7      
         10        ASSIGN                                                   !1, $7
         11      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DdoDH
function name:  bar
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'Foo%3A%3Abar'
          2        ECHO                                                     '%28'
          3        ECHO                                                     !0
          4        ECHO                                                     '%29%0A'
    5     5        FETCH_THIS                                       ~1      
          6      > RETURN                                                   ~1
    6     7*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.81 ms | 1393 KiB | 13 Q