3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makecoffee($types = array("cappuccino"), $coffeeMaker = NULL) { $device = is_null($coffeeMaker) ? "hands" : $coffeeMaker; return "Making a cup of ".join(", ", $types)." with $device.\n"; } echo makecoffee(); echo makecoffee(array("cappuccino", "lavazza"), "teapot"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4dDl1
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'makecoffee'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
    8     3        INIT_FCALL                                               'makecoffee'
          4        SEND_VAL                                                 <array>
          5        SEND_VAL                                                 'teapot'
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
    9     8      > RETURN                                                   1

Function makecoffee:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4dDl1
function name:  makecoffee
number of ops:  19
compiled vars:  !0 = $types, !1 = $coffeeMaker, !2 = $device
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      <array>
          1        RECV_INIT                                        !1      null
    4     2        TYPE_CHECK                                    2          !1
          3      > JMPZ                                                     ~3, ->6
          4    >   QM_ASSIGN                                        ~4      'hands'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~4      !1
          7    >   ASSIGN                                                   !2, ~4
    5     8        INIT_FCALL                                               'join'
          9        SEND_VAL                                                 '%2C+'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        CONCAT                                           ~7      'Making+a+cup+of+', $6
         13        ROPE_INIT                                     3  ~9      '+with+'
         14        ROPE_ADD                                      1  ~9      ~9, !2
         15        ROPE_END                                      2  ~8      ~9, '.%0A'
         16        CONCAT                                           ~11     ~7, ~8
         17      > RETURN                                                   ~11
    6    18*     > RETURN                                                   null

End of function makecoffee

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 1403 KiB | 17 Q