3v4l.org

run code in 300+ PHP versions simultaneously
<?php class 🍏 {} class 🍉 {} class 🍍 {} class 🍌 {} class 🥗 { protected $🎁🎁 = []; public function add($🎁) { $this->🎁🎁[] = $🎁; } public function __toString() { $🎁2 = []; foreach($this->🎁🎁 as $🎁){ $🎁2[get_class($🎁)] = ($🎁2 ?? 0) + 1; } foreach($🎁2 as $🎁3 => $🎁4){ $🎁2[$🎁3] = $🎁4 . ' ' . $🎁3; } echo implode(', ', $🎁2); } } $🥗 = new 🥗(); $🥗->add(new 🍏()); $🥗->add(new 🍉()); $🥗->add(new 🍍()); $🥗->add(new 🍉()); $🥗->add(new 🍉()); $🥗->add(new 🍏()); $🥗->add(new 🍉()); $🥗->add(new 🍏()); echo $🥗;

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.0070.01118.43
8.3.50.0040.01116.34
8.3.40.0120.00318.70
8.3.30.0110.00318.88
8.3.20.0040.00419.17
8.3.10.0050.00323.65
8.3.00.0000.00820.77
8.2.180.0140.00718.29
8.2.170.0070.00722.96
8.2.160.0090.00622.13
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00422.25
8.2.120.0000.00826.35
8.2.110.0000.00920.41
8.2.100.0080.00317.91
8.2.90.0030.00519.39
8.2.80.0080.00018.05
8.2.70.0030.00717.63
8.2.60.0040.00418.05
8.2.50.0030.00718.10
8.2.40.0000.00822.29
8.2.30.0050.00320.97
8.2.20.0040.00418.02
8.2.10.0040.00418.05
8.2.00.0070.00018.11
8.1.280.0100.00725.92
8.1.270.0000.00822.19
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0060.00322.54
8.1.230.0070.00419.08
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0040.00419.14
8.1.180.0050.00318.10
8.1.170.0050.00318.50
8.1.160.0070.00019.04
8.1.150.0040.00420.66
8.1.140.0060.00319.61
8.1.130.0030.00318.90
8.1.120.0040.00417.39
8.1.110.0050.00317.48
8.1.100.0070.00017.43
8.1.90.0030.00617.38
8.1.80.0030.00317.43
8.1.70.0000.00717.37
8.1.60.0060.00317.50
8.1.50.0030.00617.50
8.1.40.0000.00817.45
8.1.30.0030.00517.53
8.1.20.0050.00317.59
8.1.10.0080.00017.61
8.1.00.0040.00417.52
8.0.300.0080.00018.77
8.0.290.0060.00316.75
8.0.280.0000.00818.47
8.0.270.0000.00717.16
8.0.260.0000.00716.91
8.0.250.0030.00317.02
8.0.240.0080.00016.91
8.0.230.0020.00517.06
8.0.220.0030.00316.86
8.0.210.0040.00416.98
8.0.200.0000.00616.96
8.0.190.0050.00517.00
8.0.180.0060.00616.93
8.0.170.0040.00417.04
8.0.160.0070.00016.92
8.0.150.0070.00016.91
8.0.140.0070.00016.86
8.0.130.0030.00313.42
8.0.120.0040.00416.91
8.0.110.0000.00716.93
8.0.100.0080.00016.94
8.0.90.0040.00416.87
8.0.80.0060.00916.89
8.0.70.0000.00717.02
8.0.60.0000.00816.96
8.0.50.0040.00417.05
8.0.30.0100.00817.06
8.0.20.0100.00817.40
8.0.10.0000.00717.11
8.0.00.0100.00716.96
7.4.330.0030.00315.55
7.4.320.0000.00616.65
7.4.300.0000.00616.61
7.4.290.0070.00016.53
7.4.280.0070.00016.54
7.4.270.0040.00316.53
7.4.260.0000.00513.35
7.4.250.0030.00316.63
7.4.240.0040.00416.53
7.4.230.0070.00016.28
7.4.220.0100.00716.48
7.4.210.0030.01216.57
7.4.200.0070.00016.57
7.4.160.0090.00916.51
7.4.150.0090.00917.40
7.4.140.0050.01217.86
7.4.130.0130.01316.52
7.4.120.0110.01116.54
7.4.110.0100.00816.52
7.4.100.0140.01016.68
7.4.90.0110.00916.49
7.4.80.0030.01719.39
7.4.70.0030.01316.76
7.4.60.0130.00316.51
7.4.50.0130.00316.61
7.4.40.0140.00316.50
7.4.30.0120.00916.64
7.4.10.0070.00714.91
7.4.00.0080.00815.08
7.3.330.0000.00513.45
7.3.320.0060.00013.46
7.3.310.0000.00716.43
7.3.300.0030.00316.45
7.3.290.0100.00516.44
7.3.280.0100.00716.42
7.3.270.0090.00817.40
7.3.260.0100.00716.55
7.3.250.0110.01116.41
7.3.240.0120.00816.46
7.3.230.0230.00416.36
7.3.210.0060.01316.65
7.3.200.0090.00916.71
7.3.190.0100.01116.54
7.3.180.0120.00616.45
7.3.170.0090.00616.44
7.3.160.0090.00816.57
7.3.130.0090.00614.79
7.3.120.0080.01114.94
7.3.110.0070.01014.78
7.3.100.0050.00914.95
7.3.90.0080.00914.85
7.3.80.0070.00514.98
7.3.70.0100.00714.68
7.3.60.0060.00614.91
7.3.50.0080.00514.68
7.3.40.0030.01314.82
7.3.30.0040.00714.93
7.3.20.0020.00916.65
7.3.10.0090.00316.74
7.3.00.0070.00616.58
7.2.330.0090.00916.63
7.2.320.0070.01116.77
7.2.310.0110.00616.54
7.2.300.0090.00916.73
7.2.290.0060.01216.87
7.2.260.0060.01315.05
7.2.250.0070.01115.26
7.2.240.0050.01215.25
7.2.230.0090.00615.17
7.2.220.0100.00715.08
7.2.210.0090.00415.08
7.2.200.0040.01015.06
7.2.190.0030.01015.04
7.2.180.0060.00715.07
7.2.170.0020.00915.11
7.2.160.0000.01214.99
7.2.150.0090.00516.90
7.2.140.0040.00616.99
7.2.130.0050.01016.99
7.2.120.0070.00716.86
7.2.110.0100.00516.79
7.2.100.0060.00916.80
7.2.90.0050.01117.03
7.2.80.0040.00816.93
7.2.70.0090.00616.92
7.2.60.0050.00916.84
7.2.50.0060.00716.92
7.2.40.0060.00816.85
7.2.30.0080.00717.01
7.2.20.0050.00816.95
7.2.10.0040.01116.79
7.2.00.0050.00817.46
7.1.330.0020.01015.63
7.1.320.0070.00915.87
7.1.310.0050.00815.93
7.1.300.0020.01115.83
7.1.290.0060.00815.77
7.1.280.0080.00615.84
7.1.270.0070.00515.80
7.1.260.0050.00615.82
7.1.250.0060.00915.78
7.1.240.0070.00515.67
7.1.230.0070.00515.73
7.1.220.0040.00815.76
7.1.210.0080.00715.81
7.1.200.0080.00615.77
7.1.190.0070.00715.93
7.1.180.0110.00415.69
7.1.170.0040.00915.59
7.1.160.0080.00515.87
7.1.150.0040.00515.78
7.1.140.0070.00615.77
7.1.130.0020.01215.75
7.1.120.0020.00915.66
7.1.110.0070.00715.75
7.1.100.0040.00816.39
7.1.90.0070.00415.77
7.1.80.0020.01015.94
7.1.70.0050.00616.08
7.1.60.0220.00920.30
7.1.50.0280.00820.01
7.1.40.0200.01020.07
7.1.30.0110.00920.45
7.1.20.0070.00920.41
7.1.10.0070.00315.94
7.1.00.0040.00916.10
7.0.330.0090.00415.27
7.0.320.0040.00815.30
7.0.310.0090.00515.29
7.0.300.0070.00515.43
7.0.290.0060.00315.35
7.0.280.0040.00715.35
7.0.270.0090.00215.35
7.0.260.0090.00415.23
7.0.250.0110.00315.40
7.0.240.0060.00315.42
7.0.230.0050.00715.48
7.0.220.0030.01015.26
7.0.210.0050.00715.29
7.0.200.0280.00515.15
7.0.190.0170.00715.37
7.0.180.0200.00615.05
7.0.170.0270.00715.08
7.0.160.0050.00815.72
7.0.150.0090.00315.60
7.0.140.0040.00715.52
7.0.130.0040.00815.71
7.0.120.0040.00715.73
7.0.110.0020.00915.67
7.0.100.0030.00815.78
7.0.90.0040.00715.69
7.0.80.0040.00815.63
7.0.70.0040.01015.62
7.0.60.0040.00815.58
7.0.50.0050.00815.58
7.0.40.0250.01013.83
7.0.30.0060.00714.19
7.0.20.0030.00914.10
7.0.10.0090.00414.15
7.0.00.0040.00914.18
5.6.400.0040.00713.99
5.6.390.0120.00314.24
5.6.380.0010.01014.20
5.6.370.0030.00914.28
5.6.360.0070.00314.32
5.6.350.0110.00013.84
5.6.340.0070.00314.06
5.6.330.0030.00914.08
5.6.320.0040.01114.17
5.6.310.0090.00014.11
5.6.300.0060.00914.25
5.6.290.0130.00314.02
5.6.280.0000.01213.96
5.6.270.0060.00814.09
5.6.260.0110.00414.09
5.6.250.0070.00414.19
5.6.240.0030.01414.28
5.6.230.0140.00414.24
5.6.220.0100.00714.05
5.6.210.0070.00714.10
5.6.200.0030.00713.96
5.6.190.0060.00614.06
5.6.180.0040.01114.20
5.6.170.0070.00714.07
5.6.160.0040.00414.11
5.6.150.0040.00814.03
5.6.140.0040.00814.11
5.6.130.0100.00314.16
5.6.120.0030.01314.08
5.6.110.0090.00913.87
5.6.100.0090.00614.20
5.6.90.0090.00914.09
5.6.80.0100.00713.93
5.6.70.0060.00614.19
5.6.60.0030.00713.94
5.6.50.0080.00814.18
5.6.40.0030.00613.78
5.6.30.0060.00314.03
5.6.20.0000.01214.05
5.6.10.0080.00614.11
5.6.00.0040.00814.29

preferences:
56.74 ms | 400 KiB | 5 Q