3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = 'Apple\'s OS and the "Microsoft OS", ----- any text with quotes & symbols ---- '; $str2 = 'Sony\'s Laptop and the "Toshiba\'s"'; function implodeStrings(...$array) { $output = []; foreach($array as $str) { $output[] = $str; } return $output; } $array = implodeStrings($str1, $str2); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2Dkh
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str1, !1 = $str2, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Apple%27s+OS+and+the+%22Microsoft+OS%22%2C+-----+any+text+with+quotes+%26+symbols+----+'
    4     1        ASSIGN                                                   !1, 'Sony%27s+Laptop+and+the+%22Toshiba%27s%22'
   16     2        INIT_FCALL                                               'implodestrings'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
   18     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function implodestrings:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/i2Dkh
function name:  implodeStrings
number of ops:  10
compiled vars:  !0 = $array, !1 = $output, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_VARIADIC                                    !0      
    7     1        ASSIGN                                                   !1, <array>
    9     2      > FE_RESET_R                                       $4      !0, ->7
          3    > > FE_FETCH_R                                               $4, !2, ->7
   10     4    >   ASSIGN_DIM                                               !1
          5        OP_DATA                                                  !2
    9     6      > JMP                                                      ->3
          7    >   FE_FREE                                                  $4
   13     8      > RETURN                                                   !1
   14     9*     > RETURN                                                   null

End of function implodestrings

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.43 ms | 1402 KiB | 16 Q