3v4l.org

run code in 300+ PHP versions simultaneously
<?php class toS { public function __toString() { return "A"; } } //var_dump(preg_replace('#A#si','B',$x=new Stringable())); $x=unserialize('a:1:{O:3:"toS":{}i:1;}'); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFfCv
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'tos'
   11     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAL                                                 'a%3A1%3A%7BO%3A3%3A%22toS%22%3A%7B%7Di%3A1%3B%7D'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function __tostring

End of class toS.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.5 ms | 1394 KiB | 17 Q