3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const CONSTANT = 'constant value'; function showConstant() { echo self::CONSTANT . "\n"; } } echo MyClass::CONSTANT . "\n"; $classname = "MyClass"; echo $classname::CONSTANT . "\n"; // As of PHP 5.3.0 $class = new MyClass(); $class->showConstant(); echo $class::CONSTANT."\n"; // As of PHP 5.3.0 ?>

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.0160.00316.38
8.3.50.0090.00822.05
8.3.40.0160.00018.68
8.3.30.0070.00718.63
8.3.20.0070.01120.38
8.3.10.0040.00423.35
8.3.00.0060.00319.38
8.2.180.0100.00618.28
8.2.170.0180.00722.96
8.2.160.0110.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00319.13
8.2.120.0060.00326.35
8.2.110.0000.01122.32
8.2.100.0070.00417.50
8.2.90.0030.00619.09
8.2.80.0030.00517.97
8.2.70.0090.00017.38
8.2.60.0080.00017.80
8.2.50.0060.00318.07
8.2.40.0050.00319.34
8.2.30.0050.00220.76
8.2.20.0000.00917.61
8.2.10.0040.00418.16
8.2.00.0080.00018.09
8.1.280.0170.00025.92
8.1.270.0040.00423.77
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0100.00317.42
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0050.00317.38
8.1.180.0050.00318.10
8.1.170.0040.00420.55
8.1.160.0020.00522.05
8.1.150.0070.00018.91
8.1.140.0000.00819.54
8.1.130.0070.00017.37
8.1.120.0000.00717.38
8.1.110.0040.00417.38
8.1.100.0030.00617.46
8.1.90.0040.00417.35
8.1.80.0030.00517.50
8.1.70.0050.00217.43
8.1.60.0040.00417.61
8.1.50.0030.00617.50
8.1.40.0030.00517.52
8.1.30.0030.00617.66
8.1.20.0030.00617.70
8.1.10.0060.00317.57
8.1.00.0070.00017.52
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.51
8.0.270.0000.00717.27
8.0.260.0070.00016.84
8.0.250.0000.00717.03
8.0.240.0070.00016.98
8.0.230.0070.00017.00
8.0.220.0000.00816.89
8.0.210.0030.00316.88
8.0.200.0000.00616.82
8.0.190.0040.00416.99
8.0.180.0050.00316.89
8.0.170.0080.00016.90
8.0.160.0030.00416.91
8.0.150.0040.00416.89
8.0.140.0000.00716.77
8.0.130.0090.00013.27
8.0.120.0080.00016.87
8.0.110.0040.00416.89
8.0.100.0040.00416.80
8.0.90.0020.00516.78
8.0.80.0090.00616.87
8.0.70.0030.00316.92
8.0.60.0000.00716.79
8.0.50.0070.00016.91
8.0.30.0060.01117.10
8.0.20.0060.01317.43
8.0.10.0000.00717.09
8.0.00.0150.00616.93
7.4.330.0020.00216.69
7.4.320.0030.00316.54
7.4.300.0000.00616.52
7.4.290.0040.00416.48
7.4.280.0070.00016.55
7.4.270.0040.00416.53
7.4.260.0050.00316.53
7.4.250.0000.00816.58
7.4.240.0070.00016.43
7.4.230.0000.00716.31
7.4.220.0040.01416.64
7.4.210.0040.01416.39
7.4.200.0050.00316.62
7.4.160.0070.01016.45
7.4.150.0060.01317.40
7.4.140.0090.00817.86
7.4.130.0100.00716.54
7.4.120.0080.01016.50
7.4.110.0100.00716.37
7.4.100.0060.01116.45
7.4.90.0100.00716.49
7.4.80.0120.00619.39
7.4.70.0100.00716.42
7.4.60.0100.00716.32
7.4.50.0070.01016.43
7.4.40.0150.00616.61
7.4.30.0150.00816.63
7.4.00.0120.00214.74
7.3.330.0000.00513.19
7.3.320.0060.00013.35
7.3.310.0030.00316.32
7.3.300.0030.00316.43
7.3.290.0070.00916.35
7.3.280.0040.01316.36
7.3.270.0100.00717.40
7.3.260.0040.01316.23
7.3.250.0100.01116.49
7.3.240.0100.00816.26
7.3.230.0070.01416.61
7.3.210.0150.00416.30
7.3.200.0080.00816.32
7.3.190.0140.00716.43
7.3.180.0040.01116.63
7.3.170.0110.01416.30
7.3.160.0130.01016.38
7.3.120.0030.01414.74
7.3.110.0040.01115.04
7.3.100.0140.00014.69
7.3.90.0060.00815.03
7.3.80.0100.00614.88
7.3.70.0090.00314.84
7.3.60.0000.00914.87
7.3.50.0080.00314.76
7.3.40.0110.00414.60
7.3.30.0030.01014.64
7.3.20.0040.00416.68
7.3.10.0070.00616.71
7.3.00.0080.00516.51
7.2.330.0060.01216.67
7.2.320.0090.00916.82
7.2.310.0140.00316.79
7.2.300.0000.01616.68
7.2.290.0000.01616.50
7.2.250.0090.00614.72
7.2.240.0100.00614.84
7.2.230.0030.01015.30
7.2.220.0000.01315.29
7.2.210.0070.01014.85
7.2.200.0130.00615.13
7.2.190.0040.01115.03
7.2.180.0080.00815.11
7.2.170.0060.00915.07
7.2.130.0070.00916.77
7.2.120.0060.00816.93
7.2.110.0060.00716.72
7.2.100.0030.01116.86
7.2.90.0080.00716.98
7.2.80.0040.00716.87
7.2.70.0040.01016.83
7.2.60.0050.00816.97
7.2.50.0070.01016.91
7.2.40.0050.00916.89
7.2.30.0050.00716.94
7.2.20.0020.01216.99
7.2.10.0050.00917.00
7.2.00.0040.00817.70
7.1.330.0070.00715.82
7.1.320.0030.01315.59
7.1.310.0100.00716.05
7.1.300.0030.01015.70
7.1.290.0040.01215.71
7.1.280.0000.01215.72
7.1.270.0030.01015.54
7.1.260.0050.00515.81
7.1.250.0060.00515.80
7.1.100.0000.01318.21
7.1.70.0100.00717.19
7.1.60.0180.00719.12
7.1.50.0090.00416.64
7.1.00.0000.08022.30
7.0.200.0040.00416.79
7.0.60.0000.07020.02
7.0.50.0070.06717.89
7.0.40.0030.06320.18
7.0.30.0030.08320.07
7.0.20.0170.05020.13
7.0.10.0130.04020.15
7.0.00.0000.09020.22
5.6.280.0030.06321.07
5.6.210.0130.03320.71
5.6.200.0030.05018.16
5.6.190.0030.07320.50
5.6.180.0470.07720.61
5.6.170.0300.06320.59
5.6.160.0100.07320.50
5.6.150.0100.05018.30
5.6.140.0230.06718.28
5.6.130.0030.04018.14
5.6.120.0000.04320.99
5.6.110.0070.04020.89
5.6.100.0200.07021.14
5.6.90.0170.07021.13
5.6.80.0070.03720.36
5.5.350.3300.04020.53
5.5.340.0070.08017.98
5.5.330.0070.07320.36
5.5.320.0030.05020.24
5.5.310.0300.07320.51
5.5.300.0070.07717.98
5.5.290.0070.07018.05
5.5.280.0070.08320.73
5.5.270.0170.07320.87
5.5.260.0000.06320.65
5.5.250.0070.05320.58
5.5.240.0300.06020.16

preferences:
55.69 ms | 401 KiB | 5 Q