3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace LOLOL; abstract class Abs { public function __toString() { return strtolower(class_name($this)); /* Should print test, not abs :P */ } } class Test extends Abs { } $x = new Test; echo $x;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HH5ZN
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'lolol%5Cabs'
   13     1        DECLARE_CLASS                                            'lolol%5Ctest', 'lolol%5Cabs'
   17     2        NEW                                              $1      'LOLOL%5CTest'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   18     5        ECHO                                                     !0
          6      > RETURN                                                   1

Class LOLOL\Abs:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HH5ZN
function name:  __toString
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_NS_FCALL_BY_NAME                                    'LOLOL%5Cstrtolower'
          1        INIT_NS_FCALL_BY_NAME                                    'LOLOL%5Cclass_name'
          2        FETCH_THIS                                       $0      
          3        SEND_VAR_EX                                              $0
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR_NO_REF_EX                                       $1
          6        DO_FCALL                                      0  $2      
          7        VERIFY_RETURN_TYPE                                       $2
          8      > RETURN                                                   $2
   10     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function __tostring

End of class LOLOL\Abs.

Class LOLOL\Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.41 ms | 942 KiB | 17 Q