3v4l.org

run code in 300+ PHP versions simultaneously
<?php function profile($dump = FALSE) { static $profile; // Return the times stored in profile, then erase it if ($dump) { $temp = $profile; unset($profile); return ($temp); } $profile[] = microtime(); } // Set up a tick handler register_tick_function("profile"); // Initialize the function before the declare block profile(); // Run a block of code, throw a tick every 2nd statement declare(ticks=1) { $data = 0; ++$data; $data++; $data = $data + 1; $data+=1; } // Display the data stored in the profiler print_r(profile (TRUE));

preferences:
35.09 ms | 402 KiB | 5 Q