3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class SomeMessage { public function __toString() { return 'Hello World'; } }; (static function (string $s) { echo $s; })(new SomeMessage);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K5fFZ
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'somemessage'
   10     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FK5fFZ%3A10%241'
   12     2        INIT_DYNAMIC_CALL                                        ~0
          3        NEW                                              $1      'SomeMessage'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $1
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FK5fFZ%3A10%241

Class SomeMessage:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K5fFZ
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'Hello+World'
    7     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class SomeMessage.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171 ms | 1393 KiB | 13 Q