3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testClass{ protected $a; function __construct($a) { $this->a = $a; } public function toString() { echo $this->a; } } $b = new $testClass(10); $b->toString();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dtEpM
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b, !1 = $testClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_CLASS                                   0  $2      !1
          1        NEW                                              $3      $2
          2        SEND_VAL_EX                                              10
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   14     5        INIT_METHOD_CALL                                         !0, 'toString'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function __construct

Function tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dtEpM
function name:  toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   10     2      > RETURN                                                   null

End of function tostring

End of class testClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.7 ms | 1394 KiB | 13 Q