3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function breakCode() { return 'wrong'; } function bar($bar) { $bar = $this->breakCode(); var_dump(func_get_args()); } } (new Foo())->bar('correct');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIqRh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        SEND_VAL_EX                                              'correct'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function breakcode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIqRh
function name:  breakCode
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'wrong'
    5     1*     > RETURN                                                   null

End of function breakcode

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIqRh
function name:  bar
number of ops:  9
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         'breakCode'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
    8     4        INIT_FCALL                                               'var_dump'
          5        FUNC_GET_ARGS                                    ~3      
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.54 ms | 1443 KiB | 14 Q