PHP code example of green-elephpant / code-bench-laravel
1. Go to this page and download the library: Download green-elephpant/code-bench-laravel library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
green-elephpant / code-bench-laravel example snippets
codebench([
function () {
// The first option we want to test
date('D M d Y H:m:s');
},
function () {
// The second option we want to test
(new DateTime())->format('D M d Y H:m:s');
}
]);
codebench_start();
// Your code block here
for ($i = 0; $i < 1000; $i++) {
expensive_function_call();
}
codebench_stop();