3v4l.org

run code in 300+ PHP versions simultaneously
<?php class t { const A = 1; function __construct() { $r = new ReflectionClass($this); var_dump($r->hasConstant('A')); var_dump($r->hasConstant('c')); var_dump($r->hasConstant('A'), self::A); } protected function getA { return self::A; } } class s extends t { const A = 2; function __construct() { $r = new ReflectionClass($this); var_dump($r->hasConstant('A'), self::A, $this->getA()); } } $t = new t; $s = new s;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.180.0100.04512.40
5.4.170.0090.04912.40
5.4.160.0170.05912.40
5.4.150.0120.04312.39
5.4.140.0090.04512.08
5.4.130.0090.04312.07
5.4.120.0110.03912.03
5.4.110.0100.03912.03
5.4.100.0080.04312.03
5.4.90.0150.04812.03
5.4.80.0080.04112.03
5.4.70.0110.03912.02
5.4.60.0090.04012.02
5.4.50.0090.04012.02
5.4.40.0080.04112.01
5.4.30.0120.04512.01
5.4.20.0100.04312.00
5.4.10.0090.04412.01
5.4.00.0160.05811.50
5.3.270.0130.04912.72
5.3.260.0090.05112.72
5.3.250.0110.04212.72
5.3.240.0120.04412.72
5.3.230.0110.04212.71
5.3.220.0120.04312.68
5.3.210.0130.04412.68
5.3.200.0110.04512.68
5.3.190.0130.04312.68
5.3.180.0170.05012.67
5.3.170.0150.04112.67
5.3.160.0130.04612.67
5.3.150.0110.04812.67
5.3.140.0130.04312.66
5.3.130.0120.04512.66
5.3.120.0100.04512.66
5.3.110.0150.06112.66
5.3.100.0120.04212.13
5.3.90.0100.04112.10
5.3.80.0070.04412.09
5.3.70.0110.04212.09
5.3.60.0120.04212.08
5.3.50.0100.05012.02
5.3.40.0110.04612.03
5.3.30.0220.05311.98
5.3.20.0110.04111.77
5.3.10.0080.04311.73
5.3.00.0100.04411.72

preferences:
139.84 ms | 1394 KiB | 7 Q