3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i=0; $i<=100; $i++){ if ($i % 15 == 0){ echo "FooBar"; }else if ($i % 3 == 0){ echo "Foo"; }else if ($i % 5 == 0){ echo "Bar"; }else{ echo $i; } if ($i != 100){ echo ", "; } }
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
FooBar, 1, 2, Foo, 4, Bar, Foo, 7, 8, Foo, Bar, 11, Foo, 13, 14, FooBar, 16, 17, Foo, 19, Bar, Foo, 22, 23, Foo, Bar, 26, Foo, 28, 29, FooBar, 31, 32, Foo, 34, Bar, Foo, 37, 38, Foo, Bar, 41, Foo, 43, 44, FooBar, 46, 47, Foo, 49, Bar, Foo, 52, 53, Foo, Bar, 56, Foo, 58, 59, FooBar, 61, 62, Foo, 64, Bar, Foo, 67, 68, Foo, Bar, 71, Foo, 73, 74, FooBar, 76, 77, Foo, 79, Bar, Foo, 82, 83, Foo, Bar, 86, Foo, 88, 89, FooBar, 91, 92, Foo, 94, Bar, Foo, 97, 98, Foo, Bar

preferences:
290.18 ms | 406 KiB | 459 Q