3v4l.org

run code in 300+ PHP versions simultaneously
<?php defined('PHP_EOL') or define('PHP_EOL', "\n"); class A { public static function test(){ echo '__CLASS__ = ' . __CLASS__ . PHP_EOL; echo 'get_class = ' . get_class() . PHP_EOL; echo 'GetClass = ' . static::GetClass() . PHP_EOL; echo 'CalledCls = ' . get_called_class() . PHP_EOL; } public static function GetClass(){ return __CLASS__; } } class B extends A { public static function GetClass(){ return __CLASS__; } } echo 'A' . PHP_EOL; A::test(); echo 'B' . PHP_EOL; B::test();

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.70.0070.01416.75
8.3.60.0120.00616.63
8.3.50.0210.01116.51
8.3.40.0130.00918.83
8.3.30.0140.00018.46
8.3.20.0040.00418.77
8.3.10.0110.00418.65
8.3.00.0080.00019.38
8.2.180.0100.00316.50
8.2.170.0070.00722.96
8.2.160.0060.00918.71
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00019.50
8.2.110.0090.00020.94
8.2.100.0110.00017.91
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0050.00317.93
8.2.50.0070.00017.80
8.2.40.0040.00419.12
8.2.30.0070.00317.52
8.2.20.0060.00317.60
8.2.10.0040.00417.59
8.2.00.0030.00617.61
8.1.280.0070.01025.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00019.14
8.1.230.0030.00717.83
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0060.00317.22
8.1.180.0050.00318.10
8.1.170.0060.00317.62
8.1.160.0040.00418.94
8.1.150.0000.00718.51
8.1.140.0000.00817.36
8.1.130.0040.00419.13
8.1.120.0030.00617.28
8.1.110.0040.00417.38
8.1.100.0040.00417.35
8.1.90.0000.00717.41
8.1.80.0000.00717.44
8.1.70.0000.00717.32
8.1.60.0000.00817.34
8.1.50.0000.00717.31
8.1.40.0040.00417.35
8.1.30.0040.00417.47
8.1.20.0040.00717.43
8.1.10.0040.00417.47
8.1.00.0030.00717.41
8.0.300.0000.00918.77
8.0.290.0000.01016.63
8.0.280.0060.00318.54
8.0.270.0000.00717.21
8.0.260.0030.00316.73
8.0.250.0080.00316.87
8.0.240.0050.00316.96
8.0.230.0000.00716.93
8.0.220.0000.01016.90
8.0.210.0000.00716.89
8.0.200.0100.00016.94
8.0.190.0080.00016.94
8.0.180.0040.00416.95
8.0.170.0070.00316.87
8.0.160.0000.00716.93
8.0.150.0090.00016.73
8.0.140.0000.00716.82
8.0.130.0050.00013.29
8.0.120.0080.00016.82
8.0.110.0000.00716.94
8.0.100.0030.00516.86
8.0.90.0040.00416.64
8.0.80.0120.00416.87
8.0.70.0000.00816.70
8.0.60.0040.00416.70
8.0.50.0040.00416.76
8.0.30.0060.01216.82
8.0.20.0100.01116.88
8.0.10.0040.00416.75
8.0.00.0100.00916.91
7.4.330.0000.00412.93
7.4.320.0060.00016.35
7.4.300.0040.00416.40
7.4.290.0000.00816.55
7.4.280.0040.00416.55
7.4.270.0000.00716.53
7.4.260.0030.00313.26
7.4.250.0080.00016.45
7.4.240.0030.00316.60
7.4.230.0040.00416.40
7.4.220.0110.01516.40
7.4.210.0130.00716.38
7.4.200.0070.00016.55
7.4.190.0000.00816.43
7.4.160.0060.00916.48
7.4.150.0120.00616.48
7.4.140.0140.00417.86
7.4.130.0090.00916.46
7.4.120.0100.00716.46
7.4.110.0100.00716.41
7.4.100.0060.01116.43
7.4.90.0120.00616.33
7.4.80.0030.01719.39
7.4.70.0060.01616.39
7.4.60.0030.01316.40
7.4.50.0030.00316.34
7.4.40.0070.01116.15
7.4.30.0090.00916.48
7.4.00.0000.01514.87
7.3.330.0000.00713.23
7.3.320.0060.00013.24
7.3.310.0050.00316.25
7.3.300.0000.00616.24
7.3.290.0100.00916.26
7.3.280.0070.00716.22
7.3.270.0090.00916.20
7.3.260.0110.00716.34
7.3.240.0150.00016.59
7.3.230.0100.01416.33
7.3.210.0100.00616.20
7.3.200.0040.01216.22
7.3.190.0120.00616.34
7.3.180.0140.00616.63
7.3.170.0100.00816.44
7.3.160.0130.00616.47
7.3.120.0040.01115.08
7.2.330.0070.01616.47
7.2.320.0130.00716.38
7.2.310.0090.00916.71
7.2.300.0160.00616.36
7.2.290.0080.00916.39
7.2.00.0040.00819.39
7.1.200.0180.00915.35
7.1.100.0060.00617.90
7.1.70.0040.00417.20
7.1.60.0000.01717.10
7.1.50.0160.01634.76
7.1.00.0030.07322.54
7.0.200.0040.01116.73
7.0.140.0030.07322.12
7.0.120.0000.03322.00
7.0.60.0100.04319.91
7.0.50.0070.03717.86
7.0.40.0100.05020.27
7.0.30.0500.07020.26
7.0.20.0200.03720.07
7.0.10.0070.08320.16
7.0.00.0100.07020.11
5.6.280.0000.07320.81
5.6.210.0070.05720.52
5.6.200.0130.08018.23
5.6.190.0030.05720.62
5.6.180.0370.03720.60
5.6.170.0170.07320.61
5.6.160.0000.04720.71
5.6.150.0170.07318.29
5.6.140.0070.06318.21
5.6.130.0070.08018.27
5.6.120.0130.06721.02
5.6.110.0170.07721.14
5.6.100.0070.07020.89
5.6.90.0130.07321.00
5.6.80.0030.04020.40
5.5.350.0100.07320.47
5.5.340.0170.05317.93
5.5.330.0030.05020.25
5.5.320.0330.05020.29
5.5.310.0300.04720.38
5.5.300.0000.04317.97
5.5.290.0030.06017.95
5.5.280.0130.07320.89
5.5.270.0130.07020.68
5.5.260.0130.07720.61
5.5.250.0100.07720.62
5.5.240.0070.06020.16
5.4.450.0000.04319.47
5.4.440.0070.04719.20
5.4.430.0070.03719.32
5.4.420.0000.04019.46
5.4.410.0030.04019.05
5.4.400.0000.04018.92
5.4.390.0000.04018.94
5.4.380.0030.03718.85
5.4.370.0000.04019.23
5.4.360.0000.04019.08
5.4.350.0070.03318.85
5.4.340.0030.04319.14
5.4.320.0130.07019.14
5.4.310.0170.06718.88
5.4.300.0070.06018.94
5.4.290.0070.08019.08
5.4.280.0030.05719.14
5.4.270.0070.04318.85
5.4.260.0030.04019.00
5.4.250.0070.05318.83
5.4.240.0030.04019.07
5.4.230.0070.04018.93
5.4.220.0070.05019.23
5.4.210.0070.06019.20
5.4.200.0070.07319.20
5.4.190.0000.04719.23
5.4.180.0070.07318.91
5.4.170.0130.04018.84
5.4.160.0230.06019.15
5.4.150.0030.04319.10
5.4.140.0100.04316.43
5.4.130.0000.07716.34
5.4.120.0030.08016.54
5.4.110.0070.06016.58
5.4.100.0070.07716.58
5.4.90.0130.06316.35
5.4.80.0130.07316.58
5.4.70.0030.04716.51
5.4.60.0000.04016.66
5.4.50.0170.06316.34
5.4.40.0030.04016.36
5.4.30.0070.07316.27
5.4.20.0230.05316.43
5.4.10.0130.07016.36
5.4.00.0000.05315.95
5.3.290.0030.05014.72
5.3.280.0030.03714.48
5.3.270.0000.07314.63
5.3.260.0130.06014.66
5.3.250.0030.04014.61
5.3.240.0030.08014.66
5.3.230.0070.04714.61
5.3.220.0070.07714.62
5.3.210.0100.07714.57
5.3.200.0070.05714.57
5.3.190.0130.03714.59
5.3.180.0170.06314.64
5.3.170.0100.07314.61
5.3.160.0070.07714.59
5.3.150.0070.06714.59
5.3.140.0070.05014.57
5.3.130.0070.07714.56
5.3.120.0130.07014.71
5.3.110.0000.08314.58
5.3.100.0070.06014.04
5.3.90.0000.08314.02
5.3.80.0100.07013.95
5.3.70.0100.06714.08
5.3.60.0130.03713.98
5.3.50.0130.06713.99
5.3.40.0070.04314.11
5.3.30.0030.06713.86
5.3.20.0070.07013.71
5.3.10.0100.07013.55
5.3.00.0030.05013.64
5.2.170.0030.06311.07
5.2.160.0030.05311.05
5.2.150.0070.03311.20
5.2.140.0100.05711.14
5.2.130.0030.06011.16
5.2.120.0030.04711.10
5.2.110.0030.05711.26
5.2.100.0100.06011.11
5.2.90.0030.05711.15
5.2.80.0100.06011.04
5.2.70.0070.06011.10
5.2.60.0070.05311.00
5.2.50.0030.05711.05
5.2.40.0100.02310.95
5.2.30.0070.06011.00
5.2.20.0130.05710.88
5.2.10.0070.04310.88
5.2.00.0000.04710.68
5.1.60.0100.03010.02
5.1.50.0030.0379.97
5.1.40.0030.05010.13
5.1.30.0070.05310.34
5.1.20.0100.04310.36
5.1.10.0030.06010.05
5.1.00.0130.04310.12
5.0.50.0070.0438.69
5.0.40.0000.0278.32
5.0.30.0030.0478.21
5.0.20.0070.0408.15
5.0.10.0030.0208.13
5.0.00.0000.0478.16
4.4.90.0130.0307.80
4.4.80.0030.0337.80
4.4.70.0000.0407.80
4.4.60.0030.0307.80
4.4.50.0030.0277.80
4.4.40.0070.0507.80
4.4.30.0000.0207.80
4.4.20.0070.0277.80
4.4.10.0000.0237.80
4.4.00.0030.0237.80
4.3.110.0030.0207.80
4.3.100.0000.0177.80
4.3.90.0000.0277.80
4.3.80.0000.0477.80
4.3.70.0030.0337.80
4.3.60.0030.0207.80
4.3.50.0000.0177.80
4.3.40.0000.0307.80
4.3.30.0030.0207.80
4.3.20.0030.0207.80
4.3.10.0000.0407.80
4.3.00.0070.0377.80

preferences:
46.18 ms | 401 KiB | 5 Q