3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $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/OARtu
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $takeString
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_ANON_CLASS                                   2.122e-314  
          1        NEW                                                  $3      $2
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
   11     4        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          5        ASSIGN                                                       !1, ~6
   15     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/OARtu
function name:  {closure:/in/OARtu:11}
number of ops:  5
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
   12     1        NOP                                                          
          2        FAST_CONCAT                                          ~1      'The+string%3A+', !0
          3        ECHO                                                         ~1
   13     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/OARtu
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                       'Object+implementing+__toString%28%29+is+...'
    8     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:
168.03 ms | 2739 KiB | 13 Q