3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbstractPlatform {} class A { public function convertToDatabaseValue($value, AbstractPlatform $platform) { return $value; } } class B extends A { public function convertToDatabaseValue($value, AbstractPlatform $platform) { echo "OK"; } } $b = new B(); $b->convertToDatabaseValue("test", new AbstractPlatform());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jBG7k
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'convertToDatabaseValue'
          4        SEND_VAL_EX                                              'test'
          5        NEW                                              $4      'AbstractPlatform'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class AbstractPlatform: [no user functions]
Class A:
Function converttodatabasevalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jBG7k
function name:  convertToDatabaseValue
number of ops:  4
compiled vars:  !0 = $value, !1 = $platform
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2      > RETURN                                                   !0
    6     3*     > RETURN                                                   null

End of function converttodatabasevalue

End of class A.

Class B:
Function converttodatabasevalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jBG7k
function name:  convertToDatabaseValue
number of ops:  4
compiled vars:  !0 = $value, !1 = $platform
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ECHO                                                     'OK'
   11     3      > RETURN                                                   null

End of function converttodatabasevalue

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.26 ms | 1394 KiB | 13 Q