3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hello { public function __toString() { return null; } } $h = new Hello(); echo " First " . $h->__toString() . "\n"; echo " Second " . $h . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m6LMI
function name:  (null)
number of ops:  13
compiled vars:  !0 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'hello'
   10     1        NEW                                              $1      'Hello'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   11     4        INIT_METHOD_CALL                                         !0, '__toString'
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      '+First+', $4
          7        CONCAT                                           ~6      ~5, '%0A'
          8        ECHO                                                     ~6
   12     9        CONCAT                                           ~7      '+Second+', !0
         10        CONCAT                                           ~8      ~7, '%0A'
         11        ECHO                                                     ~8
         12      > RETURN                                                   1

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

End of function __tostring

End of class Hello.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.24 ms | 1394 KiB | 13 Q