3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new StdClass; $thing = new StdClass; $class->gericko = "truc"; $thing->sayHello = function(){ echo "hello";}; $sayHello = $thing->sayHello; $name = "gericko"; $nameClass = "class"; $nameSayHello = "sayHello"; echo ${$nameClass}->$name." ".${$nameSayHello}($class);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HL3W8
function name:  (null)
number of ops:  26
compiled vars:  !0 = $class, !1 = $thing, !2 = $sayHello, !3 = $name, !4 = $nameClass, !5 = $nameSayHello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    4     3        NEW                                              $9      'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $9
    6     6        ASSIGN_OBJ                                               !0, 'gericko'
          7        OP_DATA                                                  'truc'
    7     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHL3W8%3A7%240'
          9        ASSIGN_OBJ                                               !1, 'sayHello'
         10        OP_DATA                                                  ~14
    8    11        FETCH_OBJ_R                                      ~15     !1, 'sayHello'
         12        ASSIGN                                                   !2, ~15
    9    13        ASSIGN                                                   !3, 'gericko'
   11    14        ASSIGN                                                   !4, 'class'
   12    15        ASSIGN                                                   !5, 'sayHello'
   14    16        FETCH_R                      local               ~20     !4
         17        FETCH_OBJ_R                                      ~21     ~20, !3
         18        CONCAT                                           ~22     ~21, '+'
         19        FETCH_R                      local               ~23     !5
         20        INIT_DYNAMIC_CALL                                        ~23
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0  $24     
         23        CONCAT                                           ~25     ~22, $24
         24        ECHO                                                     ~25
         25      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FHL3W8%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.7 ms | 1395 KiB | 13 Q