3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct() { static $restricted; if (!isset($restricted)) { echo "restricted is NOT set\n"; $restricted = "Yes"; } else { echo "restricted IS set\n"; } } } $t = new Test(); $t = new 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.40.0080.00618.76
8.3.30.0110.00418.93
8.3.20.0070.00720.38
8.3.10.0050.00323.53
8.3.00.0050.00319.56
8.2.170.0100.01022.96
8.2.160.0140.00020.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00920.93
8.2.110.0000.00920.56
8.2.100.0080.00318.09
8.2.90.0080.00018.22
8.2.80.0000.00817.97
8.2.70.0030.00617.80
8.2.60.0060.00318.09
8.2.50.0040.00418.10
8.2.40.0040.00420.51
8.2.30.0020.00519.16
8.2.20.0040.00417.55
8.2.10.0040.00418.00
8.2.00.0000.00819.50
8.1.270.0030.00623.83
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00320.69
8.1.230.0000.01020.96
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0030.00717.10
8.1.180.0000.00818.10
8.1.170.0080.00018.90
8.1.160.0060.00318.80
8.1.150.0000.00820.07
8.1.140.0000.00817.44
8.1.130.0000.00717.72
8.1.120.0050.00217.36
8.1.110.0050.00217.45
8.1.100.0070.00017.46
8.1.90.0050.00217.36
8.1.80.0040.00417.46
8.1.70.0030.00317.45
8.1.60.0040.00417.54
8.1.50.0000.00817.57
8.1.40.0000.00717.55
8.1.30.0030.00517.67
8.1.20.0030.00617.61
8.1.10.0000.00917.54
8.1.00.0030.00517.42
8.0.300.0040.00419.68
8.0.290.0120.00016.63
8.0.280.0050.00318.46
8.0.270.0040.00417.16
8.0.260.0030.00317.17
8.0.250.0030.00316.97
8.0.240.0050.00216.84
8.0.230.0030.00316.95
8.0.220.0000.00716.85
8.0.210.0040.00416.88
8.0.200.0000.00716.84
8.0.190.0030.00316.88
8.0.180.0040.00416.92
8.0.170.0060.00316.88
8.0.160.0040.00416.88
8.0.150.0000.00716.90
8.0.140.0040.00416.73
8.0.130.0000.00713.27
8.0.120.0000.00816.88
8.0.110.0040.00416.86
8.0.100.0000.00816.70
8.0.90.0040.00416.74
8.0.80.0120.00316.83
8.0.70.0050.00316.84
8.0.60.0040.00416.88
8.0.50.0040.00416.74
8.0.30.0090.01017.02
8.0.20.0110.00817.40
8.0.10.0080.00016.82
8.0.00.0090.00916.75
7.4.330.0050.00015.04
7.4.320.0000.00716.40
7.4.300.0000.00616.61
7.4.290.0000.00716.60
7.4.280.0070.00016.61
7.4.270.0000.00816.62
7.4.260.0040.00416.42
7.4.250.0070.00016.57
7.4.240.0000.00816.48
7.4.230.0030.00316.59
7.4.220.0070.01116.54
7.4.210.0060.01316.56
7.4.200.0030.00316.48
7.4.160.0090.00616.44
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0100.00916.56
7.4.120.0140.00316.56
7.4.110.0120.00616.32
7.4.100.0180.00016.44
7.4.90.0110.01016.29
7.4.80.0100.00719.39
7.4.70.0060.00916.39
7.4.60.0060.00916.40
7.4.50.0000.00816.60
7.4.40.0080.00816.53
7.4.30.0130.00616.64
7.4.00.0000.01414.97
7.3.330.0050.00013.02
7.3.320.0030.00313.04
7.3.310.0060.00016.35
7.3.300.0040.00416.20
7.3.290.0120.00316.31
7.3.280.0060.01216.23
7.3.270.0150.00717.40
7.3.260.0150.00816.45
7.3.250.0110.00616.30
7.3.240.0100.00616.48
7.3.230.0040.01216.39
7.3.210.0100.00716.46
7.3.200.0090.01219.39
7.3.190.0330.02516.23
7.3.180.0060.01016.43
7.3.170.0160.00016.39
7.3.160.0090.00916.28
7.3.120.0060.00914.85
7.3.10.0150.00016.39
7.3.00.0050.00516.54
7.2.330.0130.00916.73
7.2.320.0130.00316.66
7.2.310.0140.00416.69
7.2.300.0120.00416.71
7.2.290.0070.01116.32
7.2.130.0070.00716.86
7.2.120.0090.00316.62
7.2.110.0040.01116.90
7.2.100.0080.00816.66
7.2.90.0110.00316.88
7.2.80.0060.00916.76
7.2.70.0040.01116.94
7.2.60.0080.00316.81
7.2.50.0040.00816.89
7.2.40.0030.01017.03
7.2.30.0080.00316.95
7.2.20.0080.00417.04
7.2.10.0090.00317.02
7.2.00.0040.00918.01
7.1.250.0090.00315.81
7.1.200.0030.00715.78
7.1.100.0070.01017.96
7.1.70.0030.00617.08
7.1.60.0040.01419.70
7.1.50.0140.01016.89
7.1.00.0030.07722.35
7.0.200.0000.01016.30
7.0.140.0070.07022.01
7.0.60.0100.08319.90
7.0.50.0100.04317.96
7.0.40.0070.06320.30
7.0.30.0430.04320.17
7.0.20.0270.04020.19
7.0.10.0000.05720.07
7.0.00.0200.06020.16
5.6.280.0070.07021.11
5.6.210.0100.04720.55
5.6.200.0000.06018.29
5.6.190.0070.04320.64
5.6.180.3370.04320.57
5.6.170.0230.04320.45
5.6.160.0130.08020.46
5.6.150.0070.08318.25
5.6.140.0030.04018.28
5.6.130.0170.07718.26
5.6.120.0230.05721.13
5.6.110.0100.06721.13
5.6.100.0100.08021.11
5.6.90.0030.05320.96
5.6.80.0030.03720.48
5.6.70.4700.03320.53
5.5.350.0100.07720.47
5.5.340.0100.06017.95
5.5.330.0170.06020.41
5.5.320.0400.07320.28
5.5.310.0430.06320.35
5.5.300.0070.07317.91
5.5.290.0000.08718.07
5.5.280.0130.04320.73
5.5.270.0170.06020.79
5.5.260.0070.08320.86
5.5.250.0100.08020.46
5.5.240.0230.07720.16
5.4.450.0100.07319.64
5.4.440.0000.05019.38
5.4.430.0070.07019.52
5.4.420.0000.08019.38
5.4.410.0030.08019.34
5.4.400.0070.04319.09
5.4.390.0030.04718.99
5.4.380.0000.07719.08
5.4.370.0000.06019.22
5.4.360.0000.08319.31
5.4.350.0070.06319.05
5.4.340.0000.07319.16
5.4.320.0030.05319.16
5.4.310.0070.07719.14
5.4.300.0030.07018.98
5.4.290.0000.05318.98
5.4.280.0000.05719.08
5.4.270.0070.07019.09
5.4.260.0070.06719.24
5.4.250.0100.06718.84
5.4.240.0000.05319.28
5.4.230.0000.08019.16
5.4.220.0030.07319.22
5.4.210.0000.07719.09
5.4.200.0070.07318.84
5.4.190.0100.07318.98
5.4.180.0070.07319.23
5.4.170.0030.04319.14
5.4.160.0000.04318.84
5.4.150.0070.03718.96
5.4.140.0030.03316.36
5.4.130.0000.07316.34
5.4.120.0030.07316.51
5.4.110.0000.05716.26
5.4.100.0070.04716.19
5.4.90.0100.07016.61
5.4.80.0070.07316.54
5.4.70.0030.07016.53
5.4.60.0000.04716.43
5.4.50.0000.08016.38
5.4.40.0030.04316.48
5.4.30.0030.04016.54
5.4.20.0070.04716.48
5.4.10.0000.05316.52
5.4.00.0070.04015.79
5.3.290.0000.05014.74
5.3.280.0030.06314.74
5.3.270.0000.08014.74
5.3.260.0070.07714.75
5.3.250.0000.03714.74
5.3.240.0030.03314.74
5.3.230.0070.06714.74
5.3.220.0000.07314.74
5.3.210.0030.03714.74
5.3.200.0000.05014.74
5.3.190.0100.07014.74
5.3.180.0030.07714.74
5.3.170.0070.06314.74
5.3.160.0030.07314.74
5.3.150.0070.04714.74
5.3.140.0070.06014.74
5.3.130.0070.07014.74
5.3.120.0000.04014.74
5.3.110.0000.05014.74
5.3.100.0070.07014.74
5.3.90.0030.07314.74
5.3.80.0070.06714.74
5.3.70.0070.07014.74
5.3.60.0100.03714.74
5.3.50.0000.04314.74
5.3.40.0000.05714.74
5.3.30.0030.05314.74
5.3.20.0000.04314.74
5.3.10.0000.05014.74
5.3.00.0030.04314.74
5.2.170.0000.03714.74
5.2.160.0070.05314.74
5.2.150.0070.04714.74
5.2.140.0000.04014.74
5.2.130.0000.03714.74
5.2.120.0000.06714.74
5.2.110.0000.06014.74
5.2.100.0000.06314.74
5.2.90.0070.06014.74
5.2.80.0000.06714.74
5.2.70.0030.06714.74
5.2.60.0030.03714.74
5.2.50.0030.06314.74
5.2.40.0070.04314.74
5.2.30.0000.06314.74
5.2.20.0030.03014.74
5.2.10.0030.02714.74
5.2.00.0030.06014.74
5.1.60.0000.03014.74
5.1.50.0100.02314.74
5.1.40.0000.03714.74
5.1.30.0030.06014.74
5.1.20.0100.04714.74
5.1.10.0070.02714.74
5.1.00.0030.05014.74
5.0.50.0030.04014.74
5.0.40.0000.04714.74
5.0.30.0070.05014.74
5.0.20.0070.02314.74
5.0.10.0000.04314.74
5.0.00.0000.06014.74
4.4.90.0030.03314.74
4.4.80.0030.01714.74
4.4.70.0000.01714.74
4.4.60.0000.02314.74
4.4.50.0030.01314.74
4.4.40.0000.05314.74
4.4.30.0000.02014.74
4.4.20.0000.01714.74
4.4.10.0000.02714.74
4.4.00.0000.05714.74
4.3.110.0000.02714.74
4.3.100.0000.02714.74
4.3.90.0000.03714.74
4.3.80.0000.04014.74
4.3.70.0000.03014.74
4.3.60.0000.02314.74
4.3.50.0030.03314.74
4.3.40.0000.05314.74
4.3.30.0000.03314.74
4.3.20.0070.02714.74
4.3.10.0070.03014.74
4.3.00.0030.01714.74

preferences:
44.86 ms | 400 KiB | 5 Q