3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { public const CONSTANT = 1; public function bar(): int { return Foo::CONSTANT; // Fatal error } } class Bar { use Foo; } var_dump(Bar::CONSTANT); // 1 $bar = new Bar(); $bar->bar();

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)
8.5.00.0110.01020.14
8.4.150.0010.00114.05
8.4.140.0120.01117.67
8.4.130.0060.00517.66
8.4.120.0110.01020.63
8.4.110.0050.00322.38
8.4.100.0100.00818.98
8.4.90.0080.01120.39
8.4.80.0070.00818.70
8.4.70.0190.00219.10
8.4.60.0110.00818.86
8.4.50.0130.00817.79
8.4.40.0040.01519.73
8.4.30.0150.00420.42
8.4.20.0160.00319.99
8.4.10.0200.00023.61
8.3.280.0020.00014.05
8.3.270.0160.00616.58
8.3.260.0100.01016.47
8.3.250.0100.00918.89
8.3.240.0140.00516.57
8.3.230.0030.00516.86
8.3.220.0030.00518.90
8.3.210.0040.00516.75
8.3.200.0060.00216.57
8.3.190.0040.00418.84
8.3.180.0110.00716.62
8.3.170.0080.00019.07
8.3.160.0090.00918.41
8.3.150.0040.00417.02
8.3.140.0060.01218.37
8.3.130.0000.00818.38
8.3.120.0090.00018.98
8.3.110.0110.00716.51
8.3.100.0000.00816.43
8.3.50.0030.00616.50
8.2.290.0040.00420.51
8.2.280.0040.00418.46
8.2.270.0140.00417.31
8.2.260.0200.00019.07
8.2.250.0040.01116.79
8.2.240.0090.00017.27
8.2.230.0060.00916.50
8.2.220.0030.00616.36
8.1.330.0120.00722.00
8.1.320.0090.00915.83
8.1.310.0030.01416.63
8.1.300.0110.00718.29

preferences:
73.22 ms | 403 KiB | 5 Q