3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(string $bar) { echo "I got $bar!", PHP_EOL; } foo(new class { public function __toString() { return self::class; } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrtJr
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'foo'
          1        DECLARE_ANON_CLASS                               <true>  
          2        NEW                                              $1      $0
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrtJr
function name:  foo
number of ops:  7
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        ROPE_INIT                                     3  ~2      'I+got+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%21'
          4        ECHO                                                     ~1
          5        ECHO                                                     '%0A'
          6      > RETURN                                                   null

End of function foo

Class class@anonymous:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrtJr
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   'class%40anonymous%00%2Fin%2FRrtJr%3A3%240'
          1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.32 ms | 1389 KiB | 14 Q