3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('GOLF_PLATFORM', 333); /** * this is the CHILD class */ class CustomCourse extends BaseContact/*BaseCourse*/ { public function toArray($platform = GOLF_PLATFORM) { $values = parent::toArray(platform); // do some more with $values here return $values; } } /** * this is the PARENT class */ class BaseContact /*extends Course*/ { public function toArray($platform = GOLF_PLATFORM) { $values = array(); $values['user_id'] = $this->getUserId(); // do some more in here return $values; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEdpI
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'GOLF_PLATFORM'
          2        SEND_VAL                                                 333
          3        DO_ICALL                                                 
    8     4        DECLARE_CLASS                                            'customcourse', 'basecontact'
   30     5      > RETURN                                                   1

Class CustomCourse:
Function toarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEdpI
function name:  toArray
number of ops:  8
compiled vars:  !0 = $platform, !1 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_INIT                                        !0      <const ast>
   11     1        INIT_STATIC_METHOD_CALL                                  'toArray'
          2        FETCH_CONSTANT                                   ~2      'platform'
          3        SEND_VAL_EX                                              ~2
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   13     6      > RETURN                                                   !1
   14     7*     > RETURN                                                   null

End of function toarray

End of class CustomCourse.

Class BaseContact:
Function toarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEdpI
function name:  toArray
number of ops:  8
compiled vars:  !0 = $platform, !1 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV_INIT                                        !0      <const ast>
   24     1        ASSIGN                                                   !1, <array>
   25     2        INIT_METHOD_CALL                                         'getUserId'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN_DIM                                               !1, 'user_id'
          5        OP_DATA                                                  $4
   27     6      > RETURN                                                   !1
   28     7*     > RETURN                                                   null

End of function toarray

End of class BaseContact.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1396 KiB | 15 Q