3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { public function __construct($a, $b, $c, $d = null) { print 'Parent: ' . $a . $b . $c . PHP_EOL; } } class ChildClass extends ParentClass { public function __construct(...$args) { parent::__construct(...$args); } } $child = new ChildClass(1, 2, 3, 4, 5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3VIX
function name:  (null)
number of ops:  9
compiled vars:  !0 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'ChildClass'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        SEND_VAL_EX                                              3
          4        SEND_VAL_EX                                              4
          5        SEND_VAL_EX                                              5
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
          8      > RETURN                                                   1

Class ParentClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3VIX
function name:  __construct
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      null
    5     4        CONCAT                                           ~4      'Parent%3A+', !0
          5        CONCAT                                           ~5      ~4, !1
          6        CONCAT                                           ~6      ~5, !2
          7        CONCAT                                           ~7      ~6, '%0A'
          8        ECHO                                                     ~7
    6     9      > RETURN                                                   null

End of function __construct

End of class ParentClass.

Class ChildClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3VIX
function name:  __construct
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_VARIADIC                                    !0      
   11     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
   12     5      > RETURN                                                   null

End of function __construct

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.43 ms | 1395 KiB | 13 Q