3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(string $name, $value = null) { echo func_num_args() . PHP_EOL; } test("x", 4); test("y", null); test("z");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lGMsF
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 'x'
          2        SEND_VAL                                                 4
          3        DO_FCALL                                      0          
    8     4        INIT_FCALL                                               'test'
          5        SEND_VAL                                                 'y'
          6        SEND_VAL                                                 null
          7        DO_FCALL                                      0          
    9     8        INIT_FCALL                                               'test'
          9        SEND_VAL                                                 'z'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lGMsF
function name:  test
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    4     2        FUNC_NUM_ARGS                                    ~2      
          3        CONCAT                                           ~3      ~2, '%0A'
          4        ECHO                                                     ~3
    5     5      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.62 ms | 1000 KiB | 16 Q