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/kUVol
function name:  (null)
number of ops:  13
compiled vars:  !0 = $f
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                                         $1      
          4        IS_SMALLER                                               $1, 0
          5      > JMPZ                                                     ~2, ->7
    3     6    > > RETURN                                                   null
   11     7    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkUVol%3A11%240'
          8        ASSIGN                                                   !0, ~3
   12     9        NEW                                              $5      'c'
         10        DO_FCALL                                      0          
         11        FREE                                                     $5
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkUVol%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kUVol
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%2FkUVol%3A11%240

Class c:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kUVol
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:
159.96 ms | 1396 KiB | 17 Q