3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $a; public $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } } // test only a $c = new C("foo", null); var_dump($c->a === "foo"); // test only b $c = new C(null, "foo"); var_dump($c->b === "foo"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LqH3r
function name:  (null)
number of ops:  21
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'C'
          1        SEND_VAL_EX                                              'foo'
          2        SEND_VAL_EX                                              null
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   13     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~4      !0, 'a'
          7        IS_IDENTICAL                                     ~5      ~4, 'foo'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
   16    10        NEW                                              $7      'C'
         11        SEND_VAL_EX                                              null
         12        SEND_VAL_EX                                              'foo'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !0, $7
   17    15        INIT_FCALL                                               'var_dump'
         16        FETCH_OBJ_R                                      ~10     !0, 'b'
         17        IS_IDENTICAL                                     ~11     ~10, 'foo'
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                                 
   18    20      > RETURN                                                   1

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

End of function __construct

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.83 ms | 1396 KiB | 15 Q