3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum F: string { case PHP = "Rocks!"; } const E = F::PHP; const D = new D; var_dump(x::C->{$p = 'p'}[1](...)()?->{$p . $c = 2}::PHP->value[$c]); class X { const C = D; } class D { public array $p = [1 => 'foo']; public F $p2 = E; } function foo() { return new D; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0bOpD
function name:  (null)
number of ops:  23
compiled vars:  !0 = $p, !1 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'f'
    7     1        DECLARE_CONST                                                'E', <const ast>
    8     2        DECLARE_CONST                                                'D', <const ast>
   10     3        INIT_FCALL                                                   'var_dump'
          4        FETCH_CLASS_CONSTANT                                 ~2      'x', 'C'
          5        ASSIGN                                               ~3      !0, 'p'
          6        FETCH_OBJ_R                                          ~4      ~2, ~3
          7        FETCH_DIM_R                                          ~5      ~4, 1
          8        INIT_DYNAMIC_CALL                                            ~5
          9        CALLABLE_CONVERT                                     ~6      
         10        INIT_DYNAMIC_CALL                                            ~6
         11        DO_FCALL                                          0  $7      
         12        JMP_NULL                                             ~10     $7
         13        ASSIGN                                               ~8      !1, 2
         14        CONCAT                                               ~9      !0, ~8
         15        FETCH_OBJ_R                                          ~10     $7, ~9
         16        FETCH_CLASS                                       0  $11     ~10
         17        FETCH_CLASS_CONSTANT                                 ~12     $11, 'PHP'
         18        FETCH_OBJ_R                                          ~13     ~12, 'value'
         19        FETCH_DIM_R                                          ~14     ~13, !1
         20        SEND_VAL                                                     ~14
         21        DO_ICALL                                                     
   23    22      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0bOpD
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   NEW                                                  $0      'D'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       $0
   23     3*     > RETURN                                                       null

End of function foo

Class F: [no user functions]
Class X: [no user functions]
Class D: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.35 ms | 1490 KiB | 14 Q