3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(version_compare(PHP_VERSION, '5.3.0') < 0) { return; } class c { public static $f; public function __construct() { var_dump(get_class(self::$f)); } } c::$f = function() { return 'ok'; }; new c();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lHSaO
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '5.3.0'
          3        DO_ICALL                                         $0      
          4        IS_SMALLER                                               $0, 0
          5      > JMPZ                                                     ~1, ->7
    3     6    > > RETURN                                                   null
   11     7    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlHSaO%3A11%240'
          8        ASSIGN_STATIC_PROP                                       'f', 'c'
          9        OP_DATA                                                  ~3
   12    10        NEW                                              $4      'c'
         11        DO_FCALL                                      0          
         12        FREE                                                     $4
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlHSaO%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lHSaO
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'ok'
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlHSaO%3A11%240

Class c:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lHSaO
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'f'
          2        GET_CLASS                                        ~1      ~0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    9     5      > RETURN                                                   null

End of function __construct

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.68 ms | 1396 KiB | 17 Q