3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $a = 1; } static $propertyFetch = (new Foo())->a; static $nullsafePropertyFetch = (new Foo())?->a; // If you comment the next line, you'll see a fatal error on line 7 above static $arrowFunction = fn() => 1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LJ8pG
function name:  (null)
number of ops:  15
compiled vars:  !0 = $propertyFetch, !1 = $nullsafePropertyFetch, !2 = $arrowFunction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ZEND_BIND_INIT_STATIC_OR_JMP                             !0
          1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        FETCH_OBJ_R                                      ~5      $3, 'a'
          4        BIND_STATIC                                              !0, ~5
    8     5        ZEND_BIND_INIT_STATIC_OR_JMP                             !1
          6        NEW                                              $6      'Foo'
          7        DO_FCALL                                      0          
          8        JMP_NULL                                         ~8      $6
          9        FETCH_OBJ_R                                      ~8      $6, 'a'
         10        BIND_STATIC                                              !1, ~8
   11    11        ZEND_BIND_INIT_STATIC_OR_JMP                             !2
         12        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
         13        BIND_STATIC                                              !2, ~9
   12    14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LJ8pG
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1
          1*     > RETURN                                                   null

End of Dynamic Function 0

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.53 ms | 1002 KiB | 13 Q