3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar($derp, /*array*/ $array, $is_recursive = false) { if (is_bool($array)) { $is_recursive = $array; $array = array(); } var_dump(is_recursive); } } $d = new Foo; $d->bar('derp', true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CEPWv
function name:  (null)
number of ops:  8
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        SEND_VAL_EX                                              'derp'
          5        SEND_VAL_EX                                              <true>
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Foo:
Function bar:
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/CEPWv
function name:  bar
number of ops:  12
compiled vars:  !0 = $derp, !1 = $array, !2 = $is_recursive
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <false>
    4     3        TYPE_CHECK                                   12          !1
          4      > JMPZ                                                     ~3, ->7
    5     5    >   ASSIGN                                                   !2, !1
    6     6        ASSIGN                                                   !1, <array>
    8     7    >   INIT_FCALL                                               'var_dump'
          8        FETCH_CONSTANT                                   ~6      'is_recursive'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
    9    11      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.34 ms | 1395 KiB | 15 Q