Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$t = microtime(true);
$i = 0;
while ($i < 10000000) {
$i++;
$foo = is_null($i) ? 'a' : 'b';
}
echo microtime(true) - $t;
echo PHP_EOL;
$t = microtime(true);
$i = 0;
while ($i < 10000000) {
$i++;
if (is_null($i) ) $foo = 'a';
else $foo = 'b';
}
echo microtime(true) - $t;
echo PHP_EOL;