3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class FooClass {} $foo = new FooClass(); $foo->bar = "qux"; $thing = "bar"; $qux = "th"; $grault = "ing"; function th($waldo){ global $qux, $grault, $thing; return ${$qux . $grault} . $waldo; } echo ${($foo->${${$foo->bar}.((${qux}.${grault}===$qux.${grault})?${grault}:${$qux.$grault})})}(($foo->${${$foo->bar}.((${qux}.${grault}===$qux.${grault})?${grault}:${$qux.$grault})})); // echos 'barqux'
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 52
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 52
Branch analysis from position: 48
Branch analysis from position: 52
filename:       /in/dX8rB
function name:  (null)
number of ops:  62
compiled vars:  !0 = $foo, !1 = $thing, !2 = $qux, !3 = $grault
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    4     3        NEW                                              $5      'FooClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $5
    5     6        ASSIGN_OBJ                                               !0, 'bar'
          7        OP_DATA                                                  'qux'
    6     8        ASSIGN                                                   !1, 'bar'
    7     9        ASSIGN                                                   !2, 'th'
    8    10        ASSIGN                                                   !3, 'ing'
   15    11        FETCH_OBJ_R                                      ~12     !0, 'bar'
         12        FETCH_R                      local               ~13     ~12
         13        FETCH_CONSTANT                                   ~14     'qux'
         14        FETCH_R                      local               ~15     ~14
         15        FETCH_CONSTANT                                   ~16     'grault'
         16        FETCH_R                      local               ~17     ~16
         17        CONCAT                                           ~18     ~15, ~17
         18        FETCH_CONSTANT                                   ~19     'grault'
         19        FETCH_R                      local               ~20     ~19
         20        CONCAT                                           ~21     !2, ~20
         21        IS_IDENTICAL                                             ~18, ~21
         22      > JMPZ                                                     ~22, ->27
         23    >   FETCH_CONSTANT                                   ~23     'grault'
         24        FETCH_R                      local               ~24     ~23
         25        QM_ASSIGN                                        ~25     ~24
         26      > JMP                                                      ->30
         27    >   CONCAT                                           ~26     !2, !3
         28        FETCH_R                      local               ~27     ~26
         29        QM_ASSIGN                                        ~25     ~27
         30    >   CONCAT                                           ~28     ~13, ~25
         31        FETCH_R                      local               ~29     ~28
         32        FETCH_OBJ_R                                      ~30     !0, ~29
         33        FETCH_R                      local               ~31     ~30
         34        INIT_DYNAMIC_CALL                                        ~31
         35        CHECK_FUNC_ARG                                           
         36        FETCH_OBJ_R                                      ~32     !0, 'bar'
         37        FETCH_R                      local               ~33     ~32
         38        FETCH_CONSTANT                                   ~34     'qux'
         39        FETCH_R                      local               ~35     ~34
         40        FETCH_CONSTANT                                   ~36     'grault'
         41        FETCH_R                      local               ~37     ~36
         42        CONCAT                                           ~38     ~35, ~37
         43        FETCH_CONSTANT                                   ~39     'grault'
         44        FETCH_R                      local               ~40     ~39
         45        CONCAT                                           ~41     !2, ~40
         46        IS_IDENTICAL                                             ~38, ~41
         47      > JMPZ                                                     ~42, ->52
         48    >   FETCH_CONSTANT                                   ~43     'grault'
         49        FETCH_R                      local               ~44     ~43
         50        QM_ASSIGN                                        ~45     ~44
         51      > JMP                                                      ->55
         52    >   CONCAT                                           ~46     !2, !3
         53        FETCH_R                      local               ~47     ~46
         54        QM_ASSIGN                                        ~45     ~47
         55    >   CONCAT                                           ~48     ~33, ~45
         56        FETCH_R                      local               ~49     ~48
         57        FETCH_OBJ_FUNC_ARG                               $50     !0, ~49
         58        SEND_FUNC_ARG                                            $50
         59        DO_FCALL                                      0  $51     
         60        ECHO                                                     $51
   17    61      > RETURN                                                   1

Function th:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dX8rB
function name:  th
number of ops:  9
compiled vars:  !0 = $waldo, !1 = $qux, !2 = $grault, !3 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        BIND_GLOBAL                                              !1, 'qux'
          2        BIND_GLOBAL                                              !2, 'grault'
          3        BIND_GLOBAL                                              !3, 'thing'
   12     4        CONCAT                                           ~4      !1, !2
          5        FETCH_R                      local               ~5      ~4
          6        CONCAT                                           ~6      ~5, !0
          7      > RETURN                                                   ~6
   13     8*     > RETURN                                                   null

End of function th

Class FooClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1400 KiB | 15 Q