3v4l.org

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

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

End of function __tostring

End of class a.

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

End of function __tostring

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.99 ms | 1394 KiB | 13 Q