3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static self $singleton; public function __construct() { if(!isset(self::$singleton)) { self::$singleton = $this; } return self::$singleton; } } $a = new A; $b = new A; $c = new A; var_dump($a); var_dump($b); var_dump($c); var_dump($a->__construct());

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.4.120.0060.01324.02
8.4.110.0120.00618.58
8.4.100.0120.00817.51
8.4.90.0090.00818.65
8.4.80.0060.00417.93
8.4.70.0090.00917.91
8.4.60.0100.00920.60
8.4.50.0150.00623.93
8.4.40.0100.01017.92
8.4.30.0070.01119.01
8.4.20.0120.00917.97
8.4.10.0060.00322.06
8.3.250.0050.00319.16
8.3.240.0080.00717.30
8.3.230.0090.01016.49
8.3.220.0060.00117.25
8.3.210.0100.00816.54
8.3.200.0010.00816.78
8.3.190.0040.00317.13
8.3.180.0140.00616.35
8.3.170.0140.00417.24
8.3.160.0110.00820.75
8.3.150.0090.00918.46
8.3.140.0000.00817.19
8.3.130.0030.00518.64
8.3.120.0000.01020.66
8.3.110.0060.01020.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0040.00416.63
8.3.70.0040.01116.63
8.3.60.0180.00016.63
8.3.50.0120.00318.22
8.3.40.0040.01120.02
8.3.30.0120.00418.71
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0140.00420.60
8.2.280.0120.00818.34
8.2.270.0130.00717.38
8.2.260.0150.00416.96
8.2.250.0050.00316.63
8.2.240.0050.00317.24
8.2.230.0000.00822.58
8.2.220.0040.00437.54
8.2.210.0140.00426.77
8.2.200.0090.00018.41
8.2.190.0070.00716.75
8.2.180.0170.00725.92
8.2.170.0140.00322.96
8.2.160.0100.01022.96
8.2.150.0000.00825.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00418.75
8.2.110.0040.00421.12
8.2.100.0030.00719.25
8.2.90.0000.00719.30
8.2.80.0000.00820.49
8.2.70.0060.00317.25
8.2.60.0000.00917.63
8.2.50.0030.00518.05
8.2.40.0040.00418.22
8.2.30.0000.00718.06
8.2.20.0040.00419.14
8.2.10.0040.00417.95
8.2.00.0040.00419.29
8.1.330.0090.01022.11
8.1.320.0100.00916.21
8.1.310.0040.00418.45
8.1.300.0070.01020.39
8.1.290.0100.00030.84
8.1.280.0080.00625.92
8.1.270.0080.00024.66
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.19
8.1.230.0090.00321.00
8.1.220.0000.00817.74
8.1.210.0090.00018.92
8.1.200.0060.00317.35
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0000.00717.62
8.1.160.0070.00018.93
8.1.150.0000.00818.76
8.1.140.0000.00717.37
8.1.130.0070.00019.02
8.1.120.0000.00717.39
8.1.110.0070.00017.46
8.1.100.0000.00717.44
8.1.90.0070.00017.46
8.1.80.0000.00717.49
8.1.70.0070.00017.36
8.1.60.0070.00017.61
8.1.50.0000.00717.52
8.1.40.0000.00817.49
8.1.30.0050.00217.55
8.1.20.0100.00017.62
8.1.10.0130.00617.53
8.1.00.0090.00917.50
8.0.300.0050.00320.14
8.0.290.0070.00016.75
8.0.280.0050.00518.39
8.0.270.0040.00417.34
8.0.260.0000.00618.46
8.0.250.0040.00416.87
8.0.240.0070.00016.98
8.0.230.0140.00016.93
8.0.220.0110.00416.89
8.0.210.0080.00816.75
8.0.200.0100.00416.88
8.0.190.0150.00016.96
8.0.180.0150.00016.86
8.0.170.0100.00416.92
8.0.160.0050.01016.89
8.0.150.0140.00016.90
8.0.140.0110.00416.78
8.0.130.0120.00316.69
8.0.120.0140.00316.79
8.0.110.0100.00516.81
8.0.100.0110.00416.68
8.0.90.0040.01116.83
8.0.80.0120.00216.81
8.0.70.0070.00716.80
8.0.60.0150.00016.85
8.0.50.0110.00416.82
8.0.30.0100.00516.79
8.0.20.0070.00716.85
8.0.10.0100.00516.89
7.4.330.0050.00015.55
7.4.320.0030.00316.52
7.4.300.0080.00816.63
7.4.290.0160.00016.57
7.4.280.0120.00316.58
7.4.270.0080.00816.61
7.4.260.0130.00416.44
7.4.250.0130.00316.61
7.4.240.0100.00616.59
7.4.230.0120.00516.54
7.4.220.0060.00916.61
7.4.210.0080.00516.50
7.4.200.0120.00216.59
7.4.190.0110.00316.62
7.4.180.0070.00716.46
7.4.160.0050.01016.40
7.4.150.0070.00716.46
7.4.140.0100.00316.45
7.4.130.0040.01116.43
7.4.120.0110.00316.50
7.4.110.0090.00416.36
7.4.100.0100.00416.32
7.4.90.0070.00716.46
7.4.80.0110.00316.46
7.4.70.0140.00016.39
7.4.60.0090.00516.41
7.4.50.0030.01016.35
7.4.40.0060.00616.35
7.4.30.0100.00316.36
7.4.20.0060.00616.55
7.4.10.0100.00316.44
7.4.00.0120.00016.38

preferences:
68.48 ms | 403 KiB | 5 Q