3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function instantiate() { return new static; } } class Bar extends Foo { public static function getName() { return 'Foo'; } } var_dump( Bar::instantiate() ); var_dump( $foo = new (Bar::getName()) );

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.3.40.0120.00618.72
8.3.30.0070.00720.27
8.3.20.0070.00020.28
8.3.10.0080.00022.04
8.3.00.0000.00822.43
8.2.170.0120.00622.96
8.2.160.0110.00420.35
8.2.150.0040.00424.18
8.2.140.0070.01324.66
8.2.130.0090.00926.16
8.2.120.0030.00619.69
8.2.110.0080.00022.16
8.2.100.0060.00318.72
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00018.49
8.1.230.0060.00318.45
5.4.250.0070.05718.91
5.4.240.0030.05718.89
5.4.230.0100.05018.80
5.4.220.0100.06019.01
5.4.210.0100.05018.86
5.4.200.0100.05018.86
5.4.190.0070.05318.68
5.4.180.0100.05318.71
5.4.170.0100.05318.94
5.4.160.0130.04718.88
5.4.150.0030.06718.88
5.4.140.0130.04716.36
5.4.130.0030.05016.44
5.4.120.0100.05016.55
5.4.110.0200.04016.30
5.4.100.0170.06016.45
5.4.90.0030.07716.45
5.4.80.0170.04316.30
5.4.70.0100.05316.36
5.4.60.0130.06316.23
5.4.50.0070.06716.41
5.4.40.0070.05016.54
5.4.30.0230.04016.34
5.4.20.0170.04316.21
5.4.10.0170.06716.31
5.4.00.0030.05715.91
5.3.280.0170.04314.60
5.3.270.0170.04714.60
5.3.260.0070.05314.69
5.3.250.0100.05014.69
5.3.240.0100.05014.52
5.3.230.0070.05314.57
5.3.220.0100.04714.66
5.3.210.0130.04714.57
5.3.200.0100.05014.57
5.3.190.0100.05014.63
5.3.180.0030.05314.57
5.3.170.0170.05014.73
5.3.160.0030.05014.57
5.3.150.0030.05314.64
5.3.140.0130.04714.64
5.3.130.0030.05714.38
5.3.120.0130.05714.54
5.3.110.0230.05714.64
5.3.100.0100.05014.03
5.3.90.0100.04713.85
5.3.80.0130.04314.01
5.3.70.0000.06314.10
5.3.60.0070.05013.90
5.3.50.0070.05013.94
5.3.40.0070.05014.04
5.3.30.0030.05013.99
5.3.20.0170.04313.77
5.3.10.0100.06313.87
5.3.00.0030.05313.77

preferences:
34.36 ms | 400 KiB | 5 Q