3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AnyClass { public function getInstance() { static $instance; return $instance ?: $instance = new self(); } public function __get($name) { return $name; } } var_dump(!empty((AnyClass::getInstance()->title)), !empty(AnyClass::getInstance()->title));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9dgLT
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'AnyClass', 'getInstance'
          2        DO_FCALL                                      0  $0      
          3        ISSET_ISEMPTY_PROP_OBJ                           ~1      $0, 'title'
          4        BOOL_NOT                                         ~2      ~1
          5        SEND_VAL                                                 ~2
          6        INIT_STATIC_METHOD_CALL                                  'AnyClass', 'getInstance'
          7        DO_FCALL                                      0  $3      
          8        ISSET_ISEMPTY_PROP_OBJ                           ~4      $3, 'title'
          9        BOOL_NOT                                         ~5      ~4
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class AnyClass:
Function getinstance:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9dgLT
function name:  getInstance
number of ops:  8
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        JMP_SET                                          ~1      !0, ->6
          2        NEW                          self                $2      
          3        DO_FCALL                                      0          
          4        ASSIGN                                           ~4      !0, $2
          5        QM_ASSIGN                                        ~1      ~4
          6      > RETURN                                                   ~1
    7     7*     > RETURN                                                   null

End of function getinstance

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

End of function __get

End of class AnyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.51 ms | 1400 KiB | 15 Q