3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("MAX",strlen("byebye")); const SENDOFF = "goodbye"; const START = 4; // position of "b" in goodbye $temp = SENDOFF; for ( $i = 0; $i < MAX; $i++ ){ $pos = START + ( $i % 3); $temp[$i] = SENDOFF[$pos]; } $temp{$i} = "\0"; printf("%s\n",$temp); // byebye

This is an error 404

There are `0` results


preferences:
123.99 ms | 1403 KiB | 7 Q