3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Logger { public function __construct() { register_shutdown_function(function () { // make regular flush before other shutdown functions, which allows session data collection and so on $this->flush(); // make sure log entries written by shutdown functions are also flushed // ensure "flush()" is called last when there are multiple shutdown functions register_shutdown_function([$this, 'flush'], true); }); } public function flush($final = false) { return 1; } } for ($i = 0; $i < 20; $i++) { $a = new Logger(); }

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.0150.00616.49
8.3.50.0070.01121.91
8.3.40.0140.00718.56
8.3.30.0070.01418.68
8.3.20.0050.00320.20
8.3.10.0040.00423.53
8.3.00.0060.00319.26
8.2.180.0160.00016.63
8.2.170.0070.00722.96
8.2.160.0150.00020.52
8.2.150.0030.00624.18
8.2.140.0020.00524.66
8.2.130.0040.00426.16
8.2.120.0030.00519.38
8.2.110.0040.00420.24
8.2.100.0120.00017.93
8.2.90.0030.00519.26
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0030.00519.53
8.2.30.0070.00020.64
8.2.20.0030.00517.57
8.2.10.0030.00518.15
8.2.00.0000.00818.13
8.1.280.0070.00725.92
8.1.270.0100.00023.81
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00422.24
8.1.230.0110.00019.56
8.1.220.0090.00017.79
8.1.210.0040.00418.77
8.1.200.0050.00517.47
8.1.190.0000.00917.35
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0040.00421.94
8.1.150.0050.00318.88
8.1.140.0030.00519.55
8.1.130.0040.00417.77
8.1.120.0040.00417.39
8.1.110.0040.00417.38
8.1.100.0090.00017.30
8.1.90.0070.00017.51
8.1.80.0080.00017.39
8.1.70.0000.00717.43
8.1.60.0050.00317.51
8.1.50.0040.00417.42
8.1.40.0040.00417.52
8.1.30.0080.00017.59
8.1.20.0080.00017.48
8.1.10.0060.00317.58
8.1.00.0090.00017.45
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0070.00018.38
8.0.270.0000.00717.27
8.0.260.0030.00317.34
8.0.250.0030.00316.95
8.0.240.0070.00016.96
8.0.230.0040.00416.81
8.0.220.0040.00416.80
8.0.210.0040.00416.92
8.0.200.0080.00016.97
8.0.190.0030.00616.95
8.0.180.0030.00516.99
8.0.170.0000.00816.86
8.0.160.0040.00416.86
8.0.150.0040.00416.87
8.0.140.0000.00816.87
8.0.130.0000.00613.35
8.0.120.0000.00816.76
8.0.110.0080.00016.91
8.0.100.0050.00316.78
8.0.90.0040.00316.90
8.0.80.0080.00916.88
8.0.70.0000.00816.81
8.0.60.0040.00416.89
8.0.50.0000.00816.90
8.0.30.0040.01416.96
8.0.20.0110.00717.40
8.0.10.0000.00816.90
8.0.00.0100.00716.84
7.4.330.0000.00516.79
7.4.320.0030.00316.56
7.4.300.0000.00616.58
7.4.290.0060.00016.52
7.4.280.0080.00016.49
7.4.270.0000.00716.56
7.4.260.0040.00416.60
7.4.250.0050.00216.44
7.4.240.0030.00416.56
7.4.230.0000.00716.41
7.4.220.0070.01116.53
7.4.210.0060.00916.60
7.4.200.0040.00416.64
7.4.160.0030.01316.42
7.4.150.0140.00317.40
7.4.140.0120.00917.86
7.4.130.0120.00716.50
7.4.120.0110.00716.45
7.4.110.0140.00316.65
7.4.100.0070.01016.46
7.4.90.0070.01016.52
7.4.80.0000.01719.39
7.4.70.0060.01216.52
7.4.60.0060.00916.45
7.4.50.0070.01116.52
7.4.40.0140.00716.56
7.4.30.0040.01616.52
7.4.00.0070.01015.07
7.3.330.0000.00613.30
7.3.320.0050.00013.28
7.3.310.0040.00416.32
7.3.300.0000.00616.12
7.3.290.0000.00716.16
7.3.280.0080.00916.31
7.3.270.0030.01317.40
7.3.260.0090.00816.44
7.3.250.0120.00516.45
7.3.240.0130.00516.33
7.3.230.0110.00716.43
7.3.210.0120.00616.52
7.3.200.0070.01216.34
7.3.190.0120.01016.54
7.3.180.0090.01216.46
7.3.170.0030.01816.35
7.3.160.0110.00816.36
7.2.330.0110.00716.73
7.2.320.0110.01116.71
7.2.310.0100.00616.68
7.2.300.0120.00616.62
7.2.290.0040.01416.67
7.2.60.0040.00716.82
7.2.00.0320.01019.42
7.1.200.0080.00315.75
7.1.100.0000.00918.36
7.1.70.0040.00417.13
7.1.60.0100.01619.48
7.1.50.0060.01617.11
7.1.00.0030.07722.51
7.0.200.0350.00314.87
7.0.60.0230.04019.98
7.0.50.0100.04017.88
7.0.40.0100.05020.10
7.0.30.0300.07020.17
7.0.20.0230.04720.28
7.0.10.0230.07320.07
7.0.00.0070.07320.05
5.6.280.0030.05721.13
5.6.210.0070.08320.67
5.6.200.0130.07318.29
5.6.190.0100.07320.47
5.6.180.0270.05720.77
5.6.170.0370.07720.47
5.6.160.0030.04018.21
5.6.150.0200.06018.21
5.6.140.0100.07718.23
5.6.130.0200.06318.16
5.6.120.0170.06721.10
5.6.110.0230.06721.01
5.6.100.0070.07321.02
5.6.90.0070.04021.12
5.6.80.0100.06320.53
5.5.350.0200.06320.42
5.5.340.0100.06018.04
5.5.330.0100.05720.13
5.5.320.0030.08020.38
5.5.310.0170.03720.37
5.5.300.0030.04017.98
5.5.290.0100.06017.98
5.5.280.0070.08720.78
5.5.270.0170.07020.85
5.5.260.0070.04020.80
5.5.250.0200.06720.76
5.5.240.2630.03720.27

preferences:
50.1 ms | 401 KiB | 5 Q