3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new StdClass; $thing = new StdClass; $class->jericho = " truc"; $class->sayHello = function(){ echo "hello";}; $jerichoSayHello = $class->sayHello; $name = "jericho"; $nameClass = "class"; $sayHello = "sayHello"; echo ${${$nameClass}->$name.ucfirst($sayHello)}($class->$name);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GLtm1
function name:  (null)
number of ops:  30
compiled vars:  !0 = $class, !1 = $thing, !2 = $jerichoSayHello, !3 = $name, !4 = $nameClass, !5 = $sayHello
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, 'jericho'
          7        OP_DATA                                                  '+truc'
    7     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGLtm1%3A7%240'
          9        ASSIGN_OBJ                                               !0, 'sayHello'
         10        OP_DATA                                                  ~14
    8    11        FETCH_OBJ_R                                      ~15     !0, 'sayHello'
         12        ASSIGN                                                   !2, ~15
    9    13        ASSIGN                                                   !3, 'jericho'
   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        INIT_FCALL                                               'ucfirst'
         19        SEND_VAR                                                 !5
         20        DO_ICALL                                         $22     
         21        CONCAT                                           ~23     ~21, $22
         22        FETCH_R                      local               ~24     ~23
         23        INIT_DYNAMIC_CALL                                        ~24
         24        CHECK_FUNC_ARG                                           
         25        FETCH_OBJ_FUNC_ARG                               $25     !0, !3
         26        SEND_FUNC_ARG                                            $25
         27        DO_FCALL                                      0  $26     
         28        ECHO                                                     $26
         29      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.23 ms | 1396 KiB | 15 Q