3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(&$truc) { return $truc; } $class = new StdClass; $class->gericko = "truc"; $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/28bhf
function name:  (null)
number of ops:  17
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        ASSIGN                                                   !1, 'gericko'
   11     6        ASSIGN                                                   !2, 'class'
   14     7        FETCH_R                      local               ~9      !2
          8        FETCH_OBJ_R                                      ~10     ~9, !1
          9        CONCAT                                           ~11     ~10, '+'
         10        FETCH_R                      local               ~12     !2
         11        INIT_METHOD_CALL                                         ~12, 'sayHello'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $13     
         14        CONCAT                                           ~14     ~11, $13
         15        ECHO                                                     ~14
         16      > RETURN                                                   1

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/28bhf
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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.47 ms | 1394 KiB | 13 Q