3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Stringable { public function __toString() {die ('hi'); return "A"; } } //var_dump(preg_replace('#A#si','B',$x=new Stringable())); $a=new SplStorageObject(); $a[1]='A'; echo(serialize($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Idbm
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'stringable'
   11     1        NEW                                              $1      'SplStorageObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        ASSIGN_DIM                                               !0, 1
          5        OP_DATA                                                  'A'
   13     6        INIT_FCALL                                               'serialize'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ECHO                                                     $5
         10      > RETURN                                                   1

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

End of function __tostring

End of class Stringable.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1395 KiB | 15 Q