3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __toString() { return 'string_representation'; } } mb_check_encoding(new Foo, 'UTF-8');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tRJm3
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'foo'
   11     1        INIT_FCALL                                                   'mb_check_encoding'
          2        NEW                                                  $0      'Foo'
          3        DO_FCALL                                          0          
          4        SEND_VAR                                                     $0
          5        SEND_VAL                                                     'UTF-8'
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

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

End of function __tostring

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
269.57 ms | 3206 KiB | 15 Q