3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Vehicle { public function move (...$args) { var_dump($args); //echo "I'm moving from ", $this->pointA, " to ", $this->pointB; } } class Car extends Vehicle { public function move (...$args) { var_dump($args); return $this->drive($args); } private function drive (...$args) { var_dump($args); //echo "I'm driving from ", $this->pointA, " to ", $this->pointB; } } $bmw = new Car(); $bmw->move("home", "work");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/481tV
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bmw
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Car'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'move'
          4        SEND_VAL_EX                                              'home'
          5        SEND_VAL_EX                                              'work'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Vehicle:
Function move:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/481tV
function name:  move
number of ops:  5
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_VARIADIC                                    !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function move

End of class Vehicle.

Class Car:
Function move:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/481tV
function name:  move
number of ops:  9
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_VARIADIC                                    !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4        INIT_METHOD_CALL                                         'drive'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $2      
          7      > RETURN                                                   $2
   15     8*     > RETURN                                                   null

End of function move

Function drive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/481tV
function name:  drive
number of ops:  5
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV_VARIADIC                                    !0      
   18     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   21     4      > RETURN                                                   null

End of function drive

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.1 ms | 1396 KiB | 15 Q