- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
- Meh
<?php
if (PHP_VERSION !== '7.2.0alpha2') die('Meh');
function test($label = '') {
global $t;
$t2 = microtime(1);
if ($label) echo str_pad($label . ': ', 32, '.', STR_PAD_RIGHT) . ' ' . 1000 * ($t2 - $t) . 'ms' . "\n";
$t = $t2;
}
$c = 1;
$c2 = 1;
class A {
public $a = 123;
public function __construct() {
unset($this->a);
}
public function a1() {
}
public function a2() {
fopen('php://input');
}
public function __get($name) {
return 321;
}
}
test();
for ($i = $c; $i--;) {
$a = new A();
for ($j = $c2; $j--;) {
$x = $a->a;
}
}
test('__get');
for ($i = $c; $i--;) {
$a = new A();
for ($j = $c2; $j--;) {
$x = $a->a1();
}
}
test('empty()');
for ($i = $c; $i--;) {
$a = new A();
for ($j = $c2; $j--;) {
$x = $a->a2();
}
}
test('fopen()');