3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DbSwitcher { function __construct() { print "switch DB\n"; } function __destruct() { print "switch back\n"; } } function foo() { $switched = new DbSwitcher(); echo "do queries\n"; } foo();

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.0120.00318.30
8.3.50.0100.01021.02
8.3.40.0110.00318.59
8.3.30.0100.00319.03
8.3.20.0040.00420.39
8.3.10.0040.00421.98
8.3.00.0070.00022.34
8.2.180.0040.01416.38
8.2.170.0070.01322.96
8.2.160.0120.00320.52
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.01226.16
8.2.120.0030.00719.64
8.2.110.0070.00222.29
8.2.100.0000.01117.55
8.2.90.0050.00317.84
8.2.80.0060.00317.97
8.2.70.0040.00417.50
8.2.60.0030.00517.68
8.2.50.0060.00318.07
8.2.40.0000.00818.16
8.2.30.0070.00018.09
8.2.20.0040.00417.57
8.2.10.0040.00417.49
8.2.00.0000.00717.59
8.1.280.0130.00325.92
8.1.270.0060.00320.27
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0100.00022.33
8.1.230.0000.01120.88
8.1.220.0000.00817.74
8.1.210.0030.00618.92
8.1.200.0100.00017.25
8.1.190.0000.00717.51
8.1.180.0070.00018.75
8.1.170.0090.00018.52
8.1.160.0040.00422.12
8.1.150.0000.01118.50
8.1.140.0020.00517.40
8.1.130.0000.00817.81
8.1.120.0050.00217.29
8.1.110.0050.00217.35
8.1.100.0000.00717.38
8.1.90.0030.00417.44
8.1.80.0000.00717.36
8.1.70.0030.00517.35
8.1.60.0060.00317.60
8.1.50.0040.00417.52
8.1.40.0040.00417.48
8.1.30.0050.00317.53
8.1.20.0000.00817.55
8.1.10.0040.00417.50
8.1.00.0000.00717.52
8.0.300.0040.00420.03
8.0.290.0040.00417.05
8.0.280.0030.00318.45
8.0.270.0030.00517.26
8.0.260.0000.00716.77
8.0.250.0000.00616.93
8.0.240.0040.00416.91
8.0.230.0000.00616.84
8.0.220.0030.00516.84
8.0.210.0000.00716.80
8.0.200.0000.00616.81
8.0.190.0000.00716.84
8.0.180.0110.00016.88
8.0.170.0000.00816.88
8.0.160.0040.00416.79
8.0.150.0040.00316.89
8.0.140.0000.00716.79
8.0.130.0050.00013.29
8.0.120.0040.00416.77
8.0.110.0040.00416.79
8.0.100.0040.00416.70
8.0.90.0000.00716.73
8.0.80.0100.01016.80
8.0.70.0030.00716.69
8.0.60.0050.00216.69
8.0.50.0000.00716.86
8.0.30.0100.00717.10
8.0.20.0100.00817.40
8.0.10.0040.00416.74
8.0.00.0090.00816.60
7.4.330.0030.00315.00
7.4.320.0000.00716.53
7.4.300.0030.00316.51
7.4.290.0030.00316.60
7.4.280.0040.00416.49
7.4.270.0030.00316.51
7.4.260.0070.00016.50
7.4.250.0070.00016.51
7.4.240.0030.00316.60
7.4.230.0000.00616.57
7.4.220.0180.00016.57
7.4.210.0090.00716.43
7.4.200.0070.00016.55
7.4.190.0000.00716.40
7.4.160.0090.00616.37
7.4.150.0130.00317.40
7.4.140.0100.01517.86
7.4.130.0110.00816.58
7.4.120.0130.00716.55
7.4.110.0140.00316.70
7.4.100.0060.01216.50
7.4.90.0110.01116.43
7.4.80.0100.01319.39
7.4.70.0170.00016.21
7.4.60.0070.01016.45
7.4.50.0000.00416.46
7.4.40.0070.00722.77
7.4.30.0090.00916.62
7.4.00.0060.00615.18
7.3.330.0050.00013.16
7.3.320.0000.00513.23
7.3.310.0000.00716.46
7.3.300.0030.00316.23
7.3.290.0130.00716.27
7.3.280.0120.00516.22
7.3.270.0060.01217.40
7.3.260.0150.00616.21
7.3.250.0090.00916.29
7.3.240.0140.00416.36
7.3.230.0060.01016.39
7.3.210.0110.00516.29
7.3.200.0100.01019.39
7.3.190.0080.00816.35
7.3.180.0100.00616.18
7.3.170.0060.00916.37
7.3.160.0100.01016.41
7.3.120.0030.01214.73
7.2.330.0160.00316.34
7.2.320.0060.01316.70
7.2.310.0070.01516.56
7.2.300.0120.00416.45
7.2.290.0200.00316.27
7.2.80.0090.00316.52
7.1.200.0090.00015.66
7.1.70.0000.00717.07
7.1.60.0070.00317.07
7.1.50.0090.01616.46
7.1.00.0030.07322.33
7.0.200.0030.00616.62
7.0.140.0030.07022.10
7.0.60.0230.06020.05
7.0.50.0070.06317.72
7.0.40.0100.07320.05
7.0.30.0200.08320.09
7.0.20.0270.08720.26
7.0.10.0030.09720.22
7.0.00.0030.04020.12
5.6.280.0030.07321.10
5.6.210.0030.07020.45
5.6.200.0070.04718.25
5.6.190.0070.04320.41
5.6.180.0270.06320.57
5.6.170.0130.05020.44
5.6.160.0130.07020.54
5.6.150.0130.07318.21
5.6.140.0070.03718.15
5.6.130.0030.06318.12
5.6.120.0100.08320.90
5.6.110.0030.08321.03
5.6.100.0100.07721.09
5.6.90.0070.08021.04
5.6.80.0130.07720.49
5.5.350.0200.08020.39
5.5.340.0100.06018.05
5.5.330.0100.08320.43
5.5.320.0330.07720.38
5.5.310.0200.04720.38
5.5.300.0100.08018.08
5.5.290.0070.08717.98
5.5.280.0100.08020.87
5.5.270.0070.04020.79
5.5.260.0070.08320.80
5.5.250.0130.07320.58
5.5.240.0300.04720.07
5.4.450.3200.04319.48
5.4.440.3500.05319.41
5.4.430.2730.04319.54
5.4.420.2900.03719.48
5.4.410.3070.03319.33
5.4.400.2970.03719.31
5.4.390.2700.04019.00
5.4.380.3270.03318.98
5.4.370.3230.03718.98
5.4.360.3470.04019.31
5.4.350.2530.06018.99
5.4.340.3230.03719.23
5.4.320.2830.03719.15
5.4.310.2900.04319.15
5.4.300.3300.03319.09
5.4.290.2300.03318.99
5.4.280.2700.04319.15
5.4.270.2770.03719.16
5.4.260.3000.03719.14
5.4.250.3230.03719.13
5.4.240.3000.04019.08
5.4.230.2700.04018.99
5.4.220.3200.03318.94
5.4.210.3270.03719.13
5.4.200.3300.03719.16
5.4.190.2800.03319.30
5.4.180.3270.03318.83
5.4.170.4100.03718.83
5.4.160.3000.04019.13
5.4.150.3670.04019.13
5.4.140.3070.03716.55
5.4.130.2730.03316.44
5.4.120.3000.03316.32
5.4.110.3430.03316.61
5.4.100.3030.03716.26
5.4.90.3230.03716.61
5.4.80.2870.03716.61
5.4.70.3200.03716.59
5.4.60.3300.03316.49
5.4.50.3070.03316.38
5.4.40.2730.03716.35
5.4.30.2670.04016.42
5.4.20.3170.04016.34
5.4.10.3030.04016.52
5.4.00.2770.03715.74
5.3.290.3130.03314.81
5.3.280.2970.03714.82
5.3.270.2600.05014.82
5.3.260.3170.04014.52
5.3.250.2870.03714.72
5.3.240.2770.03714.83
5.3.230.3530.03714.71
5.3.220.3270.04014.57
5.3.210.3030.04014.46
5.3.200.3170.03714.62
5.3.190.3200.04314.48
5.3.180.3230.03714.73
5.3.170.3030.03014.46
5.3.160.2500.03314.54
5.3.150.2700.04014.65
5.3.140.2730.04014.46
5.3.130.3170.04314.63
5.3.120.3230.04014.47
5.3.110.2900.03714.54
5.3.100.2700.03714.01
5.3.90.3230.04013.99
5.3.80.3270.03714.15
5.3.70.2730.04014.25
5.3.60.3070.03714.09
5.3.50.0770.03713.87
5.3.40.0130.06714.04
5.3.30.0030.04313.82
5.3.20.0630.04013.71
5.3.10.2700.04313.66
5.3.00.3070.03013.72
5.2.170.2530.02311.27
5.2.160.2830.02311.27
5.2.150.2400.03711.30
5.2.140.2200.04011.27
5.2.130.2770.03011.27
5.2.120.2730.02711.27
5.2.110.2630.02711.27
5.2.100.2800.03311.27
5.2.90.2300.02711.27
5.2.80.2670.03011.27
5.2.70.2300.02711.27
5.2.60.2930.03011.27
5.2.50.2530.02711.27
5.2.40.2170.02711.27
5.2.30.1930.03011.27
5.2.20.2130.03011.27
5.2.10.1970.03011.27
5.2.00.1700.03011.27
5.1.60.2070.02711.27
5.1.50.1930.02711.27
5.1.40.2170.03011.27
5.1.30.2230.02711.27
5.1.20.1900.02711.27
5.1.10.1970.02711.27
5.1.00.1800.02711.27
5.0.50.1000.02011.27
5.0.40.1170.02311.27
5.0.30.0930.04011.27
5.0.20.1300.02311.27
5.0.10.1230.02011.27
5.0.00.0970.04311.27
4.4.90.1230.02011.27
4.4.80.0800.01311.27
4.4.70.0830.01711.27
4.4.60.0330.01711.27
4.4.50.0070.03311.27
4.4.40.0000.02711.27
4.4.30.0030.02311.27
4.4.20.0070.02711.27
4.4.10.0030.02311.27
4.4.00.0000.04311.27
4.3.110.0000.02011.27
4.3.100.0070.01711.27
4.3.90.0030.01311.27
4.3.80.0070.04311.27
4.3.70.0030.01711.27
4.3.60.1030.01311.27
4.3.50.1170.01311.27
4.3.40.0630.02311.27
4.3.30.0600.01711.27
4.3.20.0570.01711.27
4.3.10.0770.02711.27
4.3.00.0770.02711.27

preferences:
42.55 ms | 401 KiB | 5 Q