3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $x; public function __construct($x) { $this->x = $x; } public function yo($y) { return $this->x * $y; } } echo (new Foo(100))->yo(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvJbu
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'Foo'
          1        SEND_VAL_EX                                              100
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'yo'
          4        SEND_VAL_EX                                              2
          5        DO_FCALL                                      0  $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

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

End of function __construct

Function yo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvJbu
function name:  yo
number of ops:  5
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      'x'
          2        MUL                                              ~2      !0, ~1
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function yo

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1007 KiB | 13 Q