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 SplFixedArray(3); $a[]='A'; echo(serialize($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lD5B9
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'stringable'
   11     1        NEW                                              $1      'SplFixedArray'
          2        SEND_VAL_EX                                              3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   12     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'A'
   13     7        INIT_FCALL                                               'serialize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ECHO                                                     $5
         11      > RETURN                                                   1

Class Stringable:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/lD5B9
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:
167.08 ms | 1395 KiB | 15 Q