3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Base { public static function foo() { static::bar(1, 2); new static(3, 4, 5); } abstract public static function bar($a, $b); public function __construct($x, $y, $z) { echo __METHOD__, "(", $x, ", ", $y, ", ", $z, ")\n"; } } class A extends Base { public static function bar($a, $b) { echo __METHOD__, "(", $a, ", ", $b, ")\n"; } public function __construct($x, $y, $z) { parent::__construct($x, $y, $z); echo __METHOD__, "(", $x, ", ", $y, ", ", $z, ")\n"; } } A::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Base:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  foo
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'bar'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
    5     4        NEW                          static              $1      
          5        SEND_VAL_EX                                              3
          6        SEND_VAL_EX                                              4
          7        SEND_VAL_EX                                              5
          8        DO_FCALL                                      0          
          9        FREE                                                     $1
    6    10      > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  bar
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function bar

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  __construct
number of ops:  12
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    9     3        ECHO                                                     'Base%3A%3A__construct'
          4        ECHO                                                     '%28'
          5        ECHO                                                     !0
          6        ECHO                                                     '%2C+'
          7        ECHO                                                     !1
          8        ECHO                                                     '%2C+'
          9        ECHO                                                     !2
         10        ECHO                                                     '%29%0A'
   10    11      > RETURN                                                   null

End of function __construct

End of class Base.

Class A:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  bar
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        ECHO                                                     'A%3A%3Abar'
          3        ECHO                                                     '%28'
          4        ECHO                                                     !0
          5        ECHO                                                     '%2C+'
          6        ECHO                                                     !1
          7        ECHO                                                     '%29%0A'
   16     8      > RETURN                                                   null

End of function bar

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  __construct
number of ops:  17
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   18     3        INIT_STATIC_METHOD_CALL                                  
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
   19     8        ECHO                                                     'A%3A%3A__construct'
          9        ECHO                                                     '%28'
         10        ECHO                                                     !0
         11        ECHO                                                     '%2C+'
         12        ECHO                                                     !1
         13        ECHO                                                     '%2C+'
         14        ECHO                                                     !2
         15        ECHO                                                     '%29%0A'
   20    16      > RETURN                                                   null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W3AJB
function name:  foo
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'bar'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
    5     4        NEW                          static              $1      
          5        SEND_VAL_EX                                              3
          6        SEND_VAL_EX                                              4
          7        SEND_VAL_EX                                              5
          8        DO_FCALL                                      0          
          9        FREE                                                     $1
    6    10      > RETURN                                                   null

End of function foo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.54 ms | 1399 KiB | 13 Q