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; } 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.60.0080.00818.43
8.3.50.0120.00621.91
8.3.40.0090.00518.81
8.3.30.0140.00319.10
8.3.20.0120.00320.25
8.3.10.0080.00021.84
8.3.00.0080.00022.37
8.2.180.0100.01316.32
8.2.170.0110.00422.96
8.2.160.0070.00719.07
8.2.150.0000.00824.18
8.2.140.0070.00724.66
8.2.130.0080.00026.16
8.2.120.0040.00419.41
8.2.110.0030.00622.24
8.2.100.0080.00419.21
8.2.90.0040.00419.09
8.2.80.0040.00417.97
8.2.70.0090.00017.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0050.00318.16
8.2.30.0000.00717.92
8.2.20.0030.00617.50
8.2.10.0050.00217.68
8.2.00.0090.00017.64
8.1.280.0140.00025.92
8.1.270.0080.00020.10
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00324.00
8.1.230.0040.00819.20
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0080.00017.53
8.1.180.0050.00318.62
8.1.170.0000.00818.50
8.1.160.0000.00722.11
8.1.150.0040.00418.56
8.1.140.0030.00517.26
8.1.130.0000.00717.66
8.1.120.0040.00417.37
8.1.110.0040.00417.41
8.1.100.0030.00517.41
8.1.90.0030.00517.43
8.1.80.0070.00017.43
8.1.70.0040.00417.34
8.1.60.0000.01117.56
8.1.50.0050.00217.41
8.1.40.0030.00617.34
8.1.30.0060.00317.57
8.1.20.0000.00817.65
8.1.10.0030.00517.50
8.1.00.0030.00617.45
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0000.00818.44
8.0.270.0060.00317.27
8.0.260.0040.00416.86
8.0.250.0050.00316.84
8.0.240.0000.00817.01
8.0.230.0000.00716.85
8.0.220.0030.00316.79
8.0.210.0000.00716.88
8.0.200.0000.00616.91
8.0.190.0040.00416.86
8.0.180.0040.00416.87
8.0.170.0040.00416.84
8.0.160.0000.00716.93
8.0.150.0030.00316.82
8.0.140.0040.00416.75
8.0.130.0000.00513.31
8.0.120.0040.00416.88
8.0.110.0070.00016.86
8.0.100.0040.00416.95
8.0.90.0080.00016.64
8.0.80.0040.01016.81
8.0.70.0000.00816.84
8.0.60.0000.00816.77
8.0.50.0040.00416.75
8.0.30.0110.00917.13
8.0.20.0070.01117.40
8.0.10.0000.00716.91
8.0.00.0040.01316.64
7.4.330.0000.00515.00
7.4.320.0000.00616.45
7.4.300.0060.00016.57
7.4.290.0060.00316.49
7.4.280.0070.00016.43
7.4.270.0070.00016.59
7.4.260.0030.00516.57
7.4.250.0040.00416.51
7.4.240.0030.00416.56
7.4.230.0030.00316.25
7.4.220.0150.00616.54
7.4.210.0090.01016.48
7.4.200.0080.00016.34
7.4.190.0000.00716.63
7.4.160.0070.01016.41
7.4.150.0140.00317.40
7.4.140.0130.00817.86
7.4.130.0090.00816.46
7.4.120.0090.00916.49
7.4.110.0140.00316.54
7.4.100.0090.00916.41
7.4.90.0060.01216.35
7.4.80.0090.00619.39
7.4.70.0130.00316.43
7.4.60.0030.01316.64
7.4.50.0040.00416.57
7.4.40.0030.01022.77
7.4.30.0070.01316.53
7.4.00.0070.01014.90
7.3.330.0030.00313.16
7.3.320.0030.00313.13
7.3.310.0000.00716.34
7.3.300.0000.00716.24
7.3.290.0120.00816.29
7.3.280.0100.00616.27
7.3.270.0090.00917.40
7.3.260.0070.01616.45
7.3.250.0130.00716.45
7.3.240.0120.00616.27
7.3.230.0050.01516.39
7.3.210.0120.00816.36
7.3.200.0100.01119.39
7.3.190.0080.00816.28
7.3.180.0110.00716.24
7.3.170.0070.01016.41
7.3.160.0100.01016.23
7.3.120.0040.01114.79
7.3.110.0140.00514.63
7.3.100.0070.00914.87
7.3.90.0030.01014.88
7.3.80.0070.00914.73
7.3.70.0040.01014.75
7.3.60.0050.01014.76
7.3.50.0050.00914.72
7.3.40.0050.00814.71
7.3.30.0020.01014.84
7.3.20.0080.00616.63
7.3.10.0080.00716.64
7.3.00.0070.00516.66
7.2.330.0070.01116.72
7.2.320.0080.01416.35
7.2.310.0080.00816.68
7.2.300.0050.01116.39
7.2.290.0090.00616.68
7.2.250.0050.01214.71
7.2.240.0100.01015.04
7.2.230.0040.01414.90
7.2.220.0060.00514.98
7.2.210.0040.01114.80
7.2.200.0100.00514.93
7.2.190.0070.00715.01
7.2.180.0070.00914.93
7.2.170.0040.00814.93
7.2.130.0020.01016.81
7.2.120.0080.00616.88
7.2.110.0040.01316.93
7.2.100.0030.01016.96
7.2.90.0090.00516.90
7.2.80.0030.00816.90
7.2.70.0060.00816.88
7.2.60.0030.01116.58
7.2.50.0040.01016.90
7.2.40.0050.00916.75
7.2.30.0020.01416.91
7.2.20.0020.01016.81
7.2.10.0050.00916.80
7.2.00.0050.00817.79
7.1.330.0050.00815.72
7.1.320.0040.01115.58
7.1.310.0020.01015.61
7.1.300.0030.00815.68
7.1.290.0030.00815.80
7.1.280.0110.00315.75
7.1.270.0030.00915.71
7.1.260.0080.00515.73
7.1.250.0000.01315.78
7.1.70.0110.01116.95
7.1.60.0060.00617.19
7.1.50.0140.01116.87
7.1.00.0030.03322.47
7.0.200.0040.01416.81
7.0.140.0070.07021.98
7.0.60.0030.06719.93
7.0.50.0170.07317.86
7.0.40.0000.08020.17
7.0.30.0400.06320.16
7.0.20.0370.03320.23
7.0.10.0430.07020.09
7.0.00.0130.07320.05
5.6.280.0000.07721.11
5.6.210.0170.07320.48
5.6.200.0130.06018.20
5.6.190.0100.03720.43
5.6.180.3170.04020.77
5.6.170.0170.04320.71
5.6.160.0000.06020.57
5.6.150.0000.05318.28
5.6.140.0000.08718.19
5.6.130.0070.05718.18
5.6.120.0130.04321.00
5.6.110.0100.06321.00
5.6.100.0100.06021.04
5.6.90.0070.06321.13
5.6.80.0030.04320.51
5.6.70.0330.06720.38
5.5.350.0200.06320.44
5.5.340.0070.03718.08
5.5.330.0100.07720.27
5.5.320.0200.05720.25
5.5.310.0370.07020.21
5.5.300.0030.04018.04
5.5.290.0170.07017.97
5.5.280.0070.04020.85
5.5.270.0100.07320.98
5.5.260.0030.06020.85
5.5.250.0100.07320.62
5.5.240.0100.08020.16
5.4.450.0670.05719.61
5.4.440.0670.05719.33
5.4.430.0700.07019.54
5.4.420.0700.06319.46
5.4.410.0630.05319.48
5.4.400.0530.05718.73
5.4.390.0270.06318.61
5.4.380.0300.05718.60
5.4.370.0130.05018.62
5.4.360.0100.05318.82
5.4.350.0130.07012.02
5.4.340.0080.04212.02
5.4.320.0070.03512.50
5.4.310.0050.04212.50
5.4.300.0100.03812.50
5.4.290.0070.04312.50
5.4.280.0080.03312.40
5.4.270.0040.04012.39
5.4.260.0070.03612.39
5.4.250.0070.08018.64
5.4.240.0030.06018.93
5.4.230.0200.05018.75
5.4.220.0100.06319.09
5.4.210.0100.07718.64
5.4.200.0100.05019.02
5.4.190.0070.07718.95
5.4.180.0230.05318.95
5.4.170.0070.07719.08
5.4.160.0030.05719.07
5.4.150.0070.06318.77
5.4.140.0130.06716.48
5.4.130.0130.04016.36
5.4.120.0170.05316.64
5.4.110.0230.05316.54
5.4.100.0170.04016.53
5.4.90.0170.07016.54
5.4.80.0130.06016.65
5.4.70.0100.04716.44
5.4.60.0200.06316.33
5.4.50.0200.04016.34
5.4.40.0100.05716.40
5.4.30.0230.04316.37
5.4.20.0230.04016.37
5.4.10.0230.06016.46
5.4.00.0130.06315.83
5.3.290.0050.04312.80
5.3.280.0130.06314.65
5.3.270.0200.04014.69
5.3.260.0030.06714.77
5.3.250.0130.07014.74
5.3.240.0170.06014.69
5.3.230.0230.03714.57
5.3.220.0070.05314.57
5.3.210.0100.05714.75
5.3.200.0100.06314.65
5.3.190.0070.07014.65
5.3.180.0230.05314.64
5.3.170.0100.05314.53
5.3.160.0200.06714.65
5.3.150.0170.04714.48
5.3.140.0030.06014.55
5.3.130.0170.05014.47
5.3.120.0200.05714.73
5.3.110.0230.05714.55
5.3.100.0070.05714.12
5.3.90.0130.06314.01
5.3.80.0170.04713.93
5.3.70.0070.06714.18
5.3.60.0130.05014.09
5.3.50.0200.04313.94
5.3.40.0070.05313.94
5.3.30.0100.05013.90
5.3.20.0130.05713.70
5.3.10.0170.04713.84
5.3.00.0170.05713.63
5.2.170.0070.04311.33
5.2.160.0170.04310.97
5.2.150.0000.06311.14
5.2.140.0130.05711.32
5.2.130.0100.05011.19
5.2.120.0030.04311.33
5.2.110.0070.05011.18
5.2.100.0070.04311.28
5.2.90.0130.04311.19
5.2.80.0070.04011.07
5.2.70.0170.03311.17
5.2.60.0100.04311.02
5.2.50.0070.04710.99
5.2.40.0070.04011.07
5.2.30.0100.04011.05
5.2.20.0100.04011.04
5.2.10.0130.03710.83
5.2.00.0070.05010.70
5.1.60.0000.0439.96
5.1.50.0130.04310.09
5.1.40.0070.05010.05
5.1.30.0030.04010.40
5.1.20.0030.04010.35
5.1.10.0030.04010.05
5.1.00.0000.04310.04
5.0.50.0070.0378.47
5.0.40.0030.0308.46
5.0.30.0100.0378.32
5.0.20.0100.0238.25
5.0.10.0070.0308.27
5.0.00.0000.0578.25
4.4.90.0070.0205.84
4.4.80.0000.0235.89
4.4.70.0000.0305.80
4.4.60.0130.0135.80
4.4.50.0000.0305.87
4.4.40.0130.0235.91
4.4.30.0000.0305.85
4.4.20.0030.0275.81
4.4.10.0070.0275.88
4.4.00.0070.0305.86
4.3.110.0000.0235.84
4.3.100.0030.0305.84
4.3.90.0030.0205.72
4.3.80.0030.0435.82
4.3.70.0030.0205.74
4.3.60.0030.0205.71
4.3.50.0000.0305.71
4.3.40.0000.0335.70
4.3.30.0000.0235.58
4.3.20.0000.0305.58
4.3.10.0000.0235.58
4.3.00.0170.0207.61

preferences:
39.33 ms | 401 KiB | 5 Q