3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbstractPlatform {} class A { public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) { return $sqlExpr; } } class B extends A { public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) { return sprintf('ST_GeomFromWkb(%s, %s)', $sqlExpr, 4326); } } $b = new B(); $b->convertToDatabaseValueSQL("test", new AbstractPlatform());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UqpjU
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'convertToDatabaseValueSQL'
          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 converttodatabasevaluesql:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UqpjU
function name:  convertToDatabaseValueSQL
number of ops:  4
compiled vars:  !0 = $sqlExpr, !1 = $platform
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2      > RETURN                                                   !0
    7     3*     > RETURN                                                   null

End of function converttodatabasevaluesql

End of class A.

Class B:
Function converttodatabasevaluesql:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UqpjU
function name:  convertToDatabaseValueSQL
number of ops:  9
compiled vars:  !0 = $sqlExpr, !1 = $platform
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'sprintf'
          3        SEND_VAL                                                 'ST_GeomFromWkb%28%25s%2C+%25s%29'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 4326
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   13     8*     > RETURN                                                   null

End of function converttodatabasevaluesql

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.12 ms | 1396 KiB | 15 Q