3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ob { private $b = false; public function __construct($b=false) { if ($b) $this->b = $b; } public function toString(){ return $b; } } $ob = new ob(); var_dump($ob); $ob2 = new ob(true); var_dump($ob2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2WTOZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $ob, !1 = $ob2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'ob'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   13     6        NEW                                              $6      'ob'
          7        SEND_VAL_EX                                              <true>
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
   14    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class ob:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/2WTOZ
function name:  __construct
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <false>
    5     1      > JMPZ                                                     !0, ->4
          2    >   ASSIGN_OBJ                                               'b'
          3        OP_DATA                                                  !0
    6     4    > > 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/2WTOZ
function name:  toString
number of ops:  2
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   !0
    9     1*     > RETURN                                                   null

End of function tostring

End of class ob.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.62 ms | 1399 KiB | 15 Q