3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo; const N = 100_000_000; function without_backslash() { $start = \hrtime(true); $tmp = []; for($i = 0; $i < 10000; $i++) { $tmp[] = strtoupper("test" . $i); } $stop = \hrtime(true); \printf("Without backslash: %f s\n", ($stop - $start)/1e9); } function with_backslash() { $start = \hrtime(true); $tmp = []; for($i = 0; $i < 10000; $i++) { $tmp[] = \strtoupper("test" . $i); } $stop = \hrtime(true); \printf("With backslash: %f s\n", ($stop - $start)/1e9); } without_backslash(); with_backslash(); printf("\n"); without_backslash(); with_backslash(); printf("\n"); without_backslash(); with_backslash(); printf("\n"); without_backslash(); with_backslash(); printf("\n");

preferences:
26.68 ms | 407 KiB | 5 Q