3v4l.org

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

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ppR68
function name:  hello
number of ops:  3
compiled vars:  !0 = $truc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   !0
    6     2*     > RETURN                                                   null

End of function hello

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

End of function %00%7Bclosure%7D%2Fin%2FppR68%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.46 ms | 1386 KiB | 13 Q