3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyBool { const MY_TRUE = 1; const MY_FALSE = 0; private $_type; private function __construct($type) { $this->_type = $type; } function Type() { return $this->_type; } static function MyTrue() { return new self(self::MY_TRUE); } static function MyFalse() { return new self(self::MY_FALSE); } } var_dump(MyBool::MyTrue());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pteod
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'MyBool', 'MyTrue'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

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

End of function __construct

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

End of function type

Function mytrue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pteod
function name:  MyTrue
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                          self                $0      
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $0
          4*     > RETURN                                                   null

End of function mytrue

Function myfalse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pteod
function name:  MyFalse
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                          self                $0      
          1        SEND_VAL_EX                                              0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $0
          4*     > RETURN                                                   null

End of function myfalse

End of class MyBool.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.01 ms | 1396 KiB | 15 Q