3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); class Foo { public function hoge() { $args = func_get_args(); return implode(',', $args); } } class Bar extends Foo { public function hoge() { $args = func_get_args(); $result = call_user_func_array(array('parent', 'hoge'), $args); return strrev($result); } } $foo = new Foo(); echo $foo->hoge(1,3,5) . "\n"; $bar = new Bar(); echo $bar->hoge(1,3,5) . "\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/81b3h
function name:  (null)
number of ops:  24
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   20     3        NEW                                              $3      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   21     6        INIT_METHOD_CALL                                         !0, 'hoge'
          7        SEND_VAL_EX                                              1
          8        SEND_VAL_EX                                              3
          9        SEND_VAL_EX                                              5
         10        DO_FCALL                                      0  $6      
         11        CONCAT                                           ~7      $6, '%0A'
         12        ECHO                                                     ~7
   23    13        NEW                                              $8      'Bar'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !1, $8
   24    16        INIT_METHOD_CALL                                         !1, 'hoge'
         17        SEND_VAL_EX                                              1
         18        SEND_VAL_EX                                              3
         19        SEND_VAL_EX                                              5
         20        DO_FCALL                                      0  $11     
         21        CONCAT                                           ~12     $11, '%0A'
         22        ECHO                                                     ~12
   26    23      > RETURN                                                   1

Class Foo:
Function hoge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/81b3h
function name:  hoge
number of ops:  8
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6      > RETURN                                                   $3
    9     7*     > RETURN                                                   null

End of function hoge

End of class Foo.

Class Bar:
Function hoge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/81b3h
function name:  hoge
number of ops:  12
compiled vars:  !0 = $args, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FUNC_GET_ARGS                                    ~2      
          1        ASSIGN                                                   !0, ~2
   15     2        INIT_USER_CALL                                0          'call_user_func_array', <array>
          3        SEND_ARRAY                                               !0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !1, $4
   16     7        INIT_FCALL                                               'strrev'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10      > RETURN                                                   $6
   17    11*     > RETURN                                                   null

End of function hoge

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.41 ms | 1400 KiB | 19 Q