3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = new class() { public function __toString() { return "Object implementing __toString() is ..."; } }; $takeString = function(string $string) { echo "The string: $string"; }; $takeString($string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HifEk
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $takeString
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                                   <true>  
          1        NEW                                                  $3      $2
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    9     4        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          5        ASSIGN                                                       !1, ~6
   13     6        INIT_DYNAMIC_CALL                                            !1
          7        SEND_VAR_EX                                                  !0
          8        DO_FCALL                                          0          
          9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HifEk
function name:  {closure:/in/HifEk:9}
number of ops:  5
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
   10     1        NOP                                                          
          2        FAST_CONCAT                                          ~1      'The+string%3A+', !0
          3        ECHO                                                         ~1
   11     4      > RETURN                                                       null

End of Dynamic Function 0

Class class@anonymous:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HifEk
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                       'Object+implementing+__toString%28%29+is+...'
    6     1*       VERIFY_RETURN_TYPE                                           
          2*     > RETURN                                                       null

End of function __tostring

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
225.3 ms | 2595 KiB | 13 Q