3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SkipVariadic { private $b = 1; public function set($a, $b = null) { if (func_num_args() > 1) { $this->b = $b; } } public function get() { $this->set(1); return $this->b; } } $x = new SkipVariadic(); var_dump($x->get());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6DSlE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $1      'SkipVariadic'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   22     3        INIT_FCALL                                                   'var_dump'
          4        INIT_METHOD_CALL                                             !0, 'get'
          5        DO_FCALL                                          0  $4      
          6        SEND_VAR                                                     $4
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Class SkipVariadic:
Function set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/6DSlE
function name:  set
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
    9     2        FUNC_NUM_ARGS                                        ~2      
          3        IS_SMALLER                                                   1, ~2
          4      > JMPZ                                                         ~3, ->7
   10     5    >   ASSIGN_OBJ                                                   'b'
          6        OP_DATA                                                      !1
   12     7    > > RETURN                                                       null

End of function set

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6DSlE
function name:  get
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                             'set'
          1        SEND_VAL_EX                                                  1
          2        DO_FCALL                                          0          
   17     3        FETCH_OBJ_R                                          ~1      'b'
          4      > RETURN                                                       ~1
   18     5*     > RETURN                                                       null

End of function get

End of class SkipVariadic.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.86 ms | 1104 KiB | 14 Q