3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a = 1; public function __construct($a) { $this->a = $a; } } class B { public $b = 1; public function __construct($b) { if ($b === 1) { $this->b = $b; } } } new A(1); new B(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oWl8R
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $0      'A'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
   25     4        NEW                                              $2      'B'
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0          
          7        FREE                                                     $2
          8      > RETURN                                                   1

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

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/oWl8R
function name:  __construct
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        IS_IDENTICAL                                             !0, 1
          2      > JMPZ                                                     ~1, ->5
   18     3    >   ASSIGN_OBJ                                               'b'
          4        OP_DATA                                                  !0
   20     5    > > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.02 ms | 1394 KiB | 13 Q