3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Ref; trait T { const T = 't'; public $traitProperty; public function traitMethod() {} } interface I { const I = 'I'; public function i(); } abstract class A implements I { use T { T::traitMethod as tMethod; } const A = 'A'; public function __construct() {} public function a() {} } abstract class B extends A { const B = 'B'; public $public = 'public'; protected static $publicStatic; } $r = new \ReflectionClass('Ref\B'); //$r->getProperty('publicStatic')->setAccessible(true); var_dump($r->hasMethod('tMethod')); var_dump($r->hasMethod('traitMethod')); var_dump($r->hasMethod('a')); var_dump($r->hasConstant('T'));

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.190.0090.04312.36
5.4.180.0130.03912.36
5.4.170.0110.04112.37
5.4.160.0090.03912.37
5.4.150.0090.04312.36
5.4.140.0070.04412.05
5.4.130.0090.03812.03
5.4.120.0160.04011.99
5.4.110.0070.03911.99
5.4.100.0100.03711.99
5.4.90.0120.03711.99
5.4.80.0080.04311.99
5.4.70.0110.03511.98
5.4.60.0130.03311.98
5.4.50.0100.03811.98
5.4.40.0090.03811.97
5.4.30.0090.03911.97
5.4.20.0080.03811.97
5.4.10.0120.03611.97
5.4.00.0130.05311.46
5.3.270.0080.04312.72
5.3.260.0120.03912.72
5.3.250.0120.03812.72
5.3.240.0090.04112.72
5.3.230.0100.04112.71
5.3.220.0180.05512.68
5.3.210.0110.04312.68
5.3.200.0120.04212.68
5.3.190.0130.04112.68
5.3.180.0100.04312.67
5.3.170.0110.03812.67
5.3.160.0110.04112.67
5.3.150.0120.04012.67
5.3.140.0190.05512.66
5.3.130.0110.04112.66
5.3.120.0100.04712.66
5.3.110.0120.04612.66
5.3.100.0120.04312.12
5.3.90.0110.04212.08
5.3.80.0100.04612.08
5.3.70.0130.04512.08
5.3.60.0120.04212.06
5.3.50.0100.04212.00
5.3.40.0100.03912.00
5.3.30.0140.04511.95
5.3.20.0080.04311.71
5.3.10.0110.03911.67
5.3.00.0110.04011.66

preferences:
139.89 ms | 1394 KiB | 7 Q