3v4l.org

run code in 500+ PHP versions simultaneously
<?php for($limit=10,$str=str_repeat(" ",$limit);$limit>=0;--$limit){ $arr=explode(" ",$str,$limit); $combined=implode(" ",$arr); if($combined !== $str){ throw new LogicException("implode() did not restore the original string. limit: {$limit}"); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 7
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 7
Branch analysis from position: 26
Branch analysis from position: 7
filename:       /in/l4XB6
function name:  (null)
number of ops:  27
compiled vars:  !0 = $limit, !1 = $str, !2 = $arr, !3 = $combined
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 10
          1        INIT_FCALL                                                   'str_repeat'
          2        SEND_VAL                                                     '+'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
          6      > JMP                                                          ->24
    4     7    >   INIT_FCALL                                                   'explode'
          8        SEND_VAL                                                     '+'
          9        SEND_VAR                                                     !1
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                             $7      
         12        ASSIGN                                                       !2, $7
    5    13        FRAMELESS_ICALL_2                implode             ~9      '+', !2
         14        ASSIGN                                                       !3, ~9
    6    15        IS_NOT_IDENTICAL                                             !3, !1
         16      > JMPZ                                                         ~11, ->23
    7    17    >   NEW                                                  $12     'LogicException'
         18        NOP                                                          
         19        FAST_CONCAT                                          ~13     'implode%28%29+did+not+restore+the+original+string.+limit%3A+', !0
         20        SEND_VAL_EX                                                  ~13
         21        DO_FCALL                                          0          
         22      > THROW                                             0          $12
    3    23    >   PRE_DEC                                                      !0
         24    >   IS_SMALLER_OR_EQUAL                                          0, !0
         25      > JMPNZ                                                        ~16, ->7
    9    26    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.88 ms | 2084 KiB | 15 Q