3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Basis { public function __construct($args = null) { if (is_numeric($args) && $args > 0) echo PHP_EOL . 'Geen argumenten gebruiken halve gare!' . PHP_EOL; } public function testArgs($given, $defined) { if ($given > count($defined)) echo PHP_EOL . 'Te veel argumenten gebruikt soepkip!' . PHP_EOL; } } class Testing extends Basis { public function __construct() { parent::__construct(func_num_args()); } public function someFunction($a, $b) { $this->testArgs(func_num_args(), get_defined_vars()); } } $test = new Testing('stiekem een argument toegevoegd!'); $test->someFunction('a', 'b'); $test->someFunction('a', 'b', 'eentje teveel');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fMW6G
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Testing'
          1        SEND_VAL_EX                                              'stiekem+een+argument+toegevoegd%21'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   28     4        INIT_METHOD_CALL                                         !0, 'someFunction'
          5        SEND_VAL_EX                                              'a'
          6        SEND_VAL_EX                                              'b'
          7        DO_FCALL                                      0          
   29     8        INIT_METHOD_CALL                                         !0, 'someFunction'
          9        SEND_VAL_EX                                              'a'
         10        SEND_VAL_EX                                              'b'
         11        SEND_VAL_EX                                              'eentje+teveel'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Basis:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/fMW6G
function name:  __construct
number of ops:  10
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    6     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > JMPZ_EX                                          ~2      $1, ->7
          5    >   IS_SMALLER                                       ~3      0, !0
          6        BOOL                                             ~2      ~3
          7    > > JMPZ                                                     ~2, ->9
          8    >   ECHO                                                     '%0AGeen+argumenten+gebruiken+halve+gare%21%0A'
    7     9    > > RETURN                                                   null

End of function __construct

Function testargs:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/fMW6G
function name:  testArgs
number of ops:  7
compiled vars:  !0 = $given, !1 = $defined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        COUNT                                            ~2      !1
          3        IS_SMALLER                                               ~2, !0
          4      > JMPZ                                                     ~3, ->6
          5    >   ECHO                                                     '%0ATe+veel+argumenten+gebruikt+soepkip%21%0A'
   11     6    > > RETURN                                                   null

End of function testargs

End of class Basis.

Class Testing:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fMW6G
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        FUNC_NUM_ARGS                                    ~0      
          2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0          
   19     4      > RETURN                                                   null

End of function __construct

Function somefunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fMW6G
function name:  someFunction
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        INIT_METHOD_CALL                                         'testArgs'
          3        FUNC_NUM_ARGS                                    ~2      
          4        SEND_VAL_EX                                              ~2
          5        INIT_FCALL                                               'get_defined_vars'
          6        DO_ICALL                                         $3      
          7        SEND_VAR_NO_REF_EX                                       $3
          8        DO_FCALL                                      0          
   23     9      > RETURN                                                   null

End of function somefunction

Function testargs:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/fMW6G
function name:  testArgs
number of ops:  7
compiled vars:  !0 = $given, !1 = $defined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        COUNT                                            ~2      !1
          3        IS_SMALLER                                               ~2, !0
          4      > JMPZ                                                     ~3, ->6
          5    >   ECHO                                                     '%0ATe+veel+argumenten+gebruikt+soepkip%21%0A'
   11     6    > > RETURN                                                   null

End of function testargs

End of class Testing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.21 ms | 1400 KiB | 17 Q