3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obc { function __toString() { return "chips"; } } $a = new StdClass(); $b = new Obc(); echo $b; echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GW7mC
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'obc'
    7     1        NEW                                              $2      'StdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    8     4        NEW                                              $5      'Obc'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   10     7        ECHO                                                     !1
   11     8        ECHO                                                     !0
          9      > RETURN                                                   1

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

End of function __tostring

End of class Obc.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.19 ms | 1393 KiB | 13 Q