3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function concat(string $separator = ' ', string ...$strings): string { return implode($separator, $strings); } echo concat(':', 'One', 'Two', 'Three') . "\n"; echo concat(null, '1', '2', '3');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U9Dfj
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'concat'
          1        SEND_VAL                                                 '%3A'
          2        SEND_VAL                                                 'One'
          3        SEND_VAL                                                 'Two'
          4        SEND_VAL                                                 'Three'
          5        DO_FCALL                                      0  $0      
          6        CONCAT                                           ~1      $0, '%0A'
          7        ECHO                                                     ~1
   10     8        INIT_FCALL                                               'concat'
          9        SEND_VAL                                                 null
         10        SEND_VAL                                                 '1'
         11        SEND_VAL                                                 '2'
         12        SEND_VAL                                                 '3'
         13        DO_FCALL                                      0  $2      
         14        ECHO                                                     $2
         15      > RETURN                                                   1

Function concat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U9Dfj
function name:  concat
number of ops:  10
compiled vars:  !0 = $separator, !1 = $strings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      '+'
          1        RECV_VARIADIC                                    !1      
    6     2        INIT_FCALL                                               'implode'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        VERIFY_RETURN_TYPE                                       $2
          7      > RETURN                                                   $2
    7     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function concat

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.8 ms | 1398 KiB | 17 Q