3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct() { static $restricted; if (!isset($restricted)) { echo "restricted is NOT set\n"; } else { echo "restricted IS set\n"; } } } $t = new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K9Qu6
function name:  (null)
number of ops:  4
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K9Qu6
function name:  __construct
number of ops:  8
compiled vars:  !0 = $restricted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    8     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->6
   10     4    >   ECHO                                                     'restricted+is+NOT+set%0A'
          5      > JMP                                                      ->7
   14     6    >   ECHO                                                     'restricted+IS+set%0A'
   16     7    > > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.21 ms | 1394 KiB | 13 Q