3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Stringable { public $value; public function __construct($value) { $this->value = $value; } public function __toString() { return $this->value; } } class NonStringable { public $value; public function __construct($value) { $this->value = $value; } } $items = array( new Stringable('A'), new Stringable('B'), new NonStringable('C') ); asort($items); var_dump($items);

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.0140.00716.63
8.3.50.0110.01221.99
8.3.40.0070.00718.58
8.3.30.0120.00618.46
8.3.20.0090.00618.68
8.3.10.0050.00221.60
8.3.00.0080.00017.55
8.2.180.0070.01016.75
8.2.170.0110.01122.96
8.2.160.0100.00320.80
8.2.150.0000.00924.18
8.2.140.0050.00324.66
8.2.130.0030.00621.05
8.2.120.0040.00426.35
8.2.110.0100.00019.45
8.2.100.0120.00019.66
8.2.90.0080.00019.13
8.2.80.0040.00417.97
8.2.70.0030.00617.25
8.2.60.0080.00017.77
8.2.50.0050.00318.10
8.2.40.0040.00422.18
8.2.30.0030.00719.03
8.2.20.0020.00517.63
8.2.10.0000.00718.01
8.2.00.0050.00217.90
8.1.280.0080.00825.92
8.1.270.0000.00823.88
8.1.260.0080.00028.09
8.1.250.0070.00728.09
8.1.240.0200.00022.07
8.1.230.0110.00019.48
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0000.01017.22
8.1.190.0050.00317.23
8.1.180.0050.00318.10
8.1.170.0080.00018.53
8.1.160.0020.00518.96
8.1.150.0040.00418.77
8.1.140.0070.00019.43
8.1.130.0040.00417.69
8.1.120.0000.00717.33
8.1.110.0080.00017.22
8.1.100.0050.00217.29
8.1.90.0040.00417.43
8.1.80.0020.00517.39
8.1.70.0000.00717.38
8.1.60.0040.00417.41
8.1.50.0080.00017.54
8.1.40.0000.00817.44
8.1.30.0040.00417.52
8.1.20.0080.00017.46
8.1.10.0030.00617.40
8.1.00.0030.00617.23
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0080.00018.39
8.0.270.0000.00917.23
8.0.260.0000.00617.27
8.0.250.0030.00316.93
8.0.240.0060.00016.91
8.0.230.0030.00316.94
8.0.220.0050.00216.88
8.0.210.0000.00716.76
8.0.200.0040.00416.95
8.0.190.0040.00417.02
8.0.180.0040.00416.97
8.0.170.0040.00416.96
8.0.160.0050.00316.83
8.0.150.0000.00716.77
8.0.140.0030.00316.87
8.0.130.0000.00613.37
8.0.120.0040.00416.94
8.0.110.0040.00416.91
8.0.100.0000.00716.96
8.0.90.0000.00816.78
8.0.80.0080.00816.82
8.0.70.0050.00316.99
8.0.60.0070.00016.86
8.0.50.0040.00416.77
8.0.30.0100.00816.97
8.0.20.0110.00817.40
8.0.10.0040.00417.08
8.0.00.0070.01016.72
7.4.330.0040.00015.08
7.4.320.0070.00016.49
7.4.300.0000.00616.53
7.4.290.0030.00316.62
7.4.280.0040.00416.57
7.4.270.0030.00316.61
7.4.260.0070.00016.49
7.4.250.0040.00416.37
7.4.240.0000.00716.60
7.4.230.0000.00716.34
7.4.220.0090.00916.45
7.4.210.0090.00616.71
7.4.200.0030.00316.41
7.4.160.0070.01416.46
7.4.150.0120.01217.40
7.4.140.0120.00717.86
7.4.130.0060.01216.64
7.4.120.0090.00916.39
7.4.110.0170.00716.32
7.4.100.0160.00716.47
7.4.90.0110.00716.56
7.4.80.0070.01719.39
7.4.70.0140.00416.59
7.4.60.0090.00616.49
7.4.50.0100.00316.45
7.4.40.0110.01116.39
7.4.30.0100.00716.45
7.4.00.0070.01014.96
7.3.330.0050.00013.23
7.3.320.0020.00213.31
7.3.310.0000.00716.20
7.3.300.0000.00716.31
7.3.290.0080.00716.29
7.3.280.0100.00716.28
7.3.270.0090.00917.40
7.3.260.0190.00016.31
7.3.250.0120.01016.32
7.3.240.0110.00916.39
7.3.230.0070.01416.59
7.3.210.0070.01016.47
7.3.200.0100.00716.62
7.3.190.0100.01016.30
7.3.180.0060.00916.35
7.3.170.0040.01316.36
7.3.160.0060.01116.38
7.3.120.0050.01114.65
7.3.110.0030.01114.93
7.3.100.0090.00614.61
7.3.90.0070.00914.91
7.3.80.0030.01014.70
7.3.70.0060.00614.74
7.3.60.0070.00814.65
7.3.50.0030.00914.85
7.3.40.0080.00614.63
7.3.30.0080.00714.76
7.3.20.0030.00816.58
7.3.10.0080.00816.47
7.3.00.0060.00616.54
7.2.330.0090.00916.79
7.2.320.0090.00916.41
7.2.310.0140.00316.72
7.2.300.0100.00616.59
7.2.290.0030.01516.80
7.2.250.0090.00614.71
7.2.240.0090.00914.83
7.2.230.0070.00914.97
7.2.220.0060.00714.75
7.2.210.0030.00914.95
7.2.200.0070.00515.03
7.2.190.0030.01214.90
7.2.180.0080.00314.87
7.2.170.0070.00715.05
7.2.160.0070.00714.93
7.2.150.0060.01216.55
7.2.140.0000.01416.93
7.2.130.0050.00816.65
7.2.120.0080.00816.70
7.2.110.0120.00516.55
7.2.100.0080.01016.64
7.2.90.0110.00516.68
7.2.80.0090.00816.64
7.2.70.0070.00516.56
7.2.60.0080.00816.82
7.2.50.0100.01016.71
7.2.40.0060.01016.81
7.2.30.0100.00516.82
7.2.20.0100.00316.72
7.2.10.0080.00516.80
7.2.00.0100.00416.73
7.1.330.0030.01215.71
7.1.320.0030.00915.90
7.1.310.0070.00915.92
7.1.300.0050.00715.80
7.1.290.0020.01215.57
7.1.280.0070.00915.59
7.1.270.0050.01015.66
7.1.260.0060.00715.72
7.1.250.0050.00615.62
7.1.200.0000.00915.86
7.1.70.0030.00716.86
7.1.60.0070.01719.28
7.1.50.0030.02116.63
7.1.00.0100.07022.28
7.0.200.0090.00916.57
7.0.60.0200.05321.72
7.0.50.0200.06020.36
7.0.40.0300.04720.34
7.0.30.0130.06320.46
7.0.20.0300.05720.20
7.0.10.0230.06020.29
7.0.00.0170.06720.42
5.6.280.0030.07020.91
5.6.210.0130.07020.61
5.6.200.0230.05721.19
5.6.190.0200.05721.00
5.6.180.0070.06321.18
5.6.170.0170.06021.08
5.6.160.0200.05321.09
5.6.150.0170.05721.06
5.6.140.0200.05021.18
5.6.130.0100.06321.05
5.6.120.0070.06321.21
5.6.110.0500.05721.13
5.6.100.0530.05721.03
5.6.90.0430.05721.19
5.6.80.0430.05020.60
5.6.70.0530.04320.45
5.6.60.0570.04720.41
5.6.50.0370.05720.55
5.6.40.0430.04720.32
5.6.30.0430.04720.33
5.6.20.0300.06320.39
5.6.10.0370.05720.56
5.6.00.0400.05320.41
5.5.350.0000.08720.50
5.5.340.0300.04720.78
5.5.330.0200.05720.96
5.5.320.0170.05320.84
5.5.310.0100.06720.85
5.5.300.0100.05720.98
5.5.290.0070.06320.87
5.5.280.0130.05720.87
5.5.270.0270.05720.86
5.5.260.0370.06020.88
5.5.250.0630.04720.68
5.5.240.0430.04720.22
5.5.230.0430.05320.26
5.5.220.0500.06020.42
5.5.210.0400.05320.21
5.5.200.0430.05320.39
5.5.190.0400.05320.30
5.5.180.0500.06720.15
5.5.160.0630.04020.31
5.5.150.0400.06020.15
5.5.140.0370.05720.32
5.5.130.0430.05320.07
5.5.120.0430.05320.13
5.5.110.0330.06020.38
5.5.100.0500.04720.09
5.5.90.0270.06320.11
5.5.80.0430.04720.17
5.5.70.0470.05320.18
5.5.60.0500.05020.18
5.5.50.0470.05020.12
5.5.40.0570.04020.26
5.5.30.0470.05320.25
5.5.20.0430.06320.12
5.5.10.0570.06020.15
5.5.00.0530.05320.08

preferences:
56.77 ms | 401 KiB | 5 Q