3v4l.org

run code in 300+ PHP versions simultaneously
<?php (function(string $thing){ echo $thing; }) (new class { function __toString() { return 'thing'; } }); expects: 'thing';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S4lYU
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FS4lYU%3A3%240'
    5     1        INIT_DYNAMIC_CALL                                        ~0
    6     2        DECLARE_ANON_CLASS                               <unknown> 
          3        NEW                                              $2      $1
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
    8     7      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FS4lYU%3A3%240

Class class@anonymous:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S4lYU
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'thing'
          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:
151.02 ms | 1393 KiB | 13 Q