3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "this is a string with lots of spaces ."; while(strpos($str, " ") !== false) $str = str_replace(" ", " ", $str); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/vYCgB
function name:  (null)
number of ops:  10
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'this+is++++++a+string+++with+lots+of+spaces++++.'
    5     1      > JMP                                                          ->5
    6     2    >   FRAMELESS_ICALL_3                str_replace         ~2      '++', '+'
          3        OP_DATA                                                      !0
          4        ASSIGN                                                       !0, ~2
    5     5    >   FRAMELESS_ICALL_2                strpos              ~4      !0, '++'
          6        TYPE_CHECK                                      1018          ~4
          7      > JMPNZ                                                        ~5, ->2
    8     8    >   ECHO                                                         !0
          9      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
222.86 ms | 2224 KiB | 13 Q