3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); // lint >= 8.1 final class Foo implements \Stringable { private function __construct(public readonly string $value) { } public static function fromString(string $string): self { return new self($string); } public function __toString(): string { return $this->value; } } function userlandComparator(string $a, string $b): int { return strnatcasecmp($a, $b); } $options = [ Foo::fromString('c'), Foo::fromString('b'), Foo::fromString('a'), ]; uasort($options, 'userlandComparator'); var_dump($options);

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.5.30.0460.00716.14
8.5.20.0260.00616.34
8.5.10.0260.00516.50
8.5.00.0180.00516.46
8.4.180.0410.01119.25
8.4.170.0200.00819.71
8.4.160.0150.00619.40
8.4.150.0150.00619.54
8.4.140.0180.00417.46
8.4.130.0170.00317.39
8.4.120.0180.00517.46
8.4.110.0140.00817.57
8.4.100.0170.00617.66
8.4.90.0160.00517.68
8.4.80.0170.00617.75
8.4.70.0170.00517.46
8.4.60.0170.00617.66
8.4.50.0180.00417.66
8.4.40.0210.00217.76
8.4.30.0170.00517.65
8.4.20.0200.00317.76
8.4.10.0170.00617.60
8.3.300.0230.00417.79
8.3.290.0170.00418.09
8.3.280.0170.00318.18
8.3.270.0170.00416.59
8.3.260.0160.00416.70
8.3.250.0180.00516.69
8.3.240.0150.00616.68
8.3.230.0160.00416.48
8.3.220.0170.00516.74
8.3.210.0190.00416.41
8.3.200.0190.00416.55
8.3.190.0170.00316.52
8.3.180.0180.00516.45
8.3.170.0170.00416.64
8.3.160.0170.00416.63
8.3.150.0170.00516.59
8.3.140.0200.00316.71
8.3.130.0140.00516.58
8.3.120.0170.00216.46
8.3.110.0150.00416.59
8.3.100.0170.00316.56
8.3.90.0170.00416.35
8.3.80.0200.00016.62
8.3.70.0180.00116.64
8.3.60.0150.00516.57
8.3.50.0180.00416.64
8.3.40.0190.00317.75
8.3.30.0150.00517.66
8.3.20.0120.00517.76
8.3.10.0160.00417.69
8.3.00.0100.00817.74
8.2.300.0200.00717.90
8.2.290.0140.00416.42
8.2.280.0130.00516.47
8.2.270.0150.00516.55
8.2.260.0160.00416.42
8.2.250.0170.00316.49
8.2.240.0160.00316.54
8.2.230.0150.00516.26
8.2.220.0160.00316.49
8.2.210.0160.00416.49
8.2.200.0190.00516.54
8.2.190.0170.00316.54
8.2.180.0130.00616.40
8.2.170.0210.00918.13
8.2.160.0230.00218.08
8.2.150.0120.00417.95
8.2.140.0140.00217.90
8.2.130.0160.00017.96
8.2.120.0170.00817.51
8.2.110.0160.01017.99
8.2.100.0240.01117.86
8.2.90.0290.00717.86
8.2.80.0310.00417.75
8.2.70.0290.00617.96
8.2.60.0300.00617.74
8.2.50.0280.00917.75
8.2.40.0210.00817.85
8.2.30.0140.00617.79
8.2.20.0120.00417.63
8.2.10.0100.00517.79
8.2.00.0120.00417.65
8.1.340.0350.00417.36
8.1.330.0270.01116.14
8.1.320.0300.00616.30
8.1.310.0240.00915.98
8.1.300.0250.01315.88
8.1.290.0290.00916.02
8.1.280.0240.01216.27
8.1.270.0330.00617.71
8.1.260.0270.00917.68
8.1.250.0260.00817.59
8.1.240.0310.00617.64
8.1.230.0270.00817.32
8.1.220.0280.00717.65
8.1.210.0270.00917.47
8.1.200.0290.00717.73
8.1.190.0290.00717.59
8.1.180.0310.00617.54
8.1.170.0210.00917.46
8.1.160.0250.01117.57
8.1.150.0320.00717.48
8.1.140.0270.00817.54
8.1.130.0270.00817.53
8.1.120.0250.01017.73
8.1.110.0240.00817.68
8.1.100.0280.00817.55
8.1.90.0240.01017.61
8.1.80.0240.01017.74
8.1.70.0290.00517.69
8.1.60.0280.00717.81
8.1.50.0260.00817.69
8.1.40.0240.01117.81
8.1.30.0290.01017.91
8.1.20.0260.01017.74
8.1.10.0280.00917.82
8.1.00.0290.00817.77
8.0.300.0270.00716.89
8.0.290.0260.00916.78
8.0.280.0140.00316.92
8.0.270.0200.00516.80
8.0.260.0280.00816.80
8.0.250.0270.00716.93
8.0.240.0280.00716.88
8.0.230.0280.00617.04
8.0.220.0260.00616.63
8.0.210.0260.00716.77
8.0.200.0260.00716.84
8.0.190.0270.00816.96
8.0.180.0240.00916.96
8.0.170.0250.00816.96
8.0.160.0270.00716.84
8.0.150.0320.00516.81
8.0.140.0280.00816.61
8.0.130.0350.00116.90
8.0.120.0230.01017.09
8.0.110.0250.00816.65
8.0.100.0260.00816.73
8.0.90.0270.00616.79
8.0.80.0240.00616.79
8.0.70.0180.00916.70
8.0.60.0220.00816.60
8.0.50.0240.00916.68
8.0.30.0240.00916.90
8.0.20.0290.00516.66
8.0.10.0260.00616.91
8.0.00.0260.00717.14
7.4.330.0240.01016.59
7.4.320.0210.00516.52
7.4.300.0250.00916.58
7.4.290.0260.00616.54
7.4.280.0230.00916.46
7.4.270.0330.00516.24
7.4.260.0250.00716.46
7.4.250.0260.00616.42
7.4.240.0290.00616.52
7.4.230.0270.00716.55
7.4.220.0200.01216.43
7.4.210.0250.00916.03
7.4.200.0250.00716.57
7.4.190.0280.00616.52
7.4.180.0230.01016.57
7.4.160.0270.00716.42
7.4.150.0280.00516.44
7.4.140.0230.00916.34
7.4.130.0240.00616.38
7.4.120.0170.00216.35
7.4.110.0280.00516.28
7.4.100.0230.01016.31
7.4.90.0240.00916.35
7.4.80.0250.00616.29
7.4.70.0290.00616.19
7.4.60.0260.00716.04
7.4.50.0250.00916.16
7.4.40.0280.00516.21
7.4.30.0260.00516.39
7.4.20.0210.00516.25
7.4.10.0290.00616.21
7.4.00.0240.00816.37
7.3.330.0240.00716.25
7.3.320.0220.00516.37
7.3.310.0230.00816.43
7.3.300.0200.01216.34
7.3.290.0250.00616.43
7.3.280.0230.00516.37
7.3.270.0250.00616.43
7.3.260.0230.00816.37
7.3.250.0260.00616.38
7.3.240.0240.00716.37
7.3.230.0260.00616.37
7.3.220.0170.00916.30
7.3.210.0190.01016.36
7.3.200.0270.00716.23
7.3.190.0220.00516.30
7.3.180.0250.00616.34
7.3.170.0230.00916.07
7.3.160.0270.00416.36
7.3.150.0220.00916.27
7.3.140.0250.00516.27
7.3.130.0220.00816.30
7.3.120.0260.00616.30
7.3.110.0230.00916.23
7.3.100.0240.00616.18
7.3.90.0250.00816.43
7.3.80.0220.01016.25
7.3.70.0240.00616.42
7.3.60.0230.00816.09
7.3.50.0220.01016.31
7.3.40.0200.00416.45
7.3.30.0120.00416.48
7.3.20.0260.01118.36
7.3.10.0290.00318.09
7.3.00.0200.01118.20
7.2.340.0220.00916.07
7.2.330.0180.00716.20
7.2.320.0180.00716.37
7.2.310.0230.00216.45
7.2.300.0110.00216.39
7.2.290.0080.00516.32
7.2.280.0120.00316.41
7.2.270.0200.00416.31
7.2.260.0210.00516.33
7.2.250.0260.00516.34
7.2.240.0290.00216.22
7.2.230.0240.00716.26
7.2.220.0240.00816.19
7.2.210.0280.00516.29
7.2.200.0220.00916.46
7.2.190.0250.00816.34
7.2.180.0240.00816.50
7.2.170.0210.01116.44
7.2.160.0250.00716.54
7.2.150.0300.00518.18
7.2.140.0240.00718.16
7.2.130.0250.01018.23
7.2.120.0280.00618.43
7.2.110.0280.00818.31
7.2.100.0240.00718.27
7.2.90.0230.00818.33
7.2.80.0250.00618.29
7.2.70.0240.00918.26
7.2.60.0240.00618.36
7.2.50.0230.00818.40
7.2.40.0250.00818.15
7.2.30.0250.00518.39
7.2.20.0240.00718.39
7.2.10.0280.00718.46
7.2.00.0230.01118.43
7.1.330.0240.00817.35
7.1.320.0230.00917.05
7.1.310.0160.00717.23
7.1.300.0240.00517.17
7.1.290.0210.01117.12
7.1.280.0220.00916.97
7.1.270.0230.00717.19
7.1.260.0250.00617.23
7.1.250.0240.00617.24
7.1.240.0200.00917.17
7.1.230.0250.00617.27
7.1.220.0300.00417.06
7.1.210.0220.00717.38
7.1.200.0220.00817.39
7.1.190.0250.00517.35
7.1.180.0240.00617.16
7.1.170.0210.01017.04
7.1.160.0200.01017.17
7.1.150.0210.00517.29
7.1.140.0190.00617.17
7.1.130.0210.00617.23
7.1.120.0230.00617.10
7.1.110.0240.00517.24
7.1.100.0240.00716.98
7.1.90.0260.00517.00
7.1.80.0200.00917.16
7.1.70.0270.00817.05
7.1.60.0260.00817.16
7.1.50.0190.00517.24
7.1.40.0240.00617.02
7.1.30.0230.00617.04
7.1.20.0220.00816.92
7.1.10.0270.00517.09
7.1.00.0210.00917.20
7.0.330.0230.00816.72
7.0.320.0270.00716.92
7.0.310.0180.01016.95
7.0.300.0170.00417.02
7.0.290.0110.00417.06
7.0.280.0170.00516.88
7.0.270.0220.00416.96
7.0.260.0140.00517.01
7.0.250.0210.00617.21
7.0.240.0230.00817.34
7.0.230.0260.00417.03
7.0.220.0210.00816.76
7.0.210.0290.00616.83
7.0.200.0260.00716.75
7.0.190.0160.00216.86
7.0.180.0100.00417.06
7.0.170.0150.00316.78
7.0.160.0190.00416.94
7.0.150.0200.00516.86
7.0.140.0220.00317.05
7.0.130.0090.00717.02
7.0.120.0110.00217.16
7.0.110.0120.00516.72
7.0.100.0210.00517.13
7.0.90.0210.00717.06
7.0.80.0240.00417.04
7.0.70.0240.00517.01
7.0.60.0180.00516.85
7.0.50.0240.00316.79
7.0.40.0150.01016.91
7.0.30.0240.00917.06
7.0.20.0220.00816.88
7.0.10.0250.00516.75
7.0.00.0210.00816.86
5.6.400.0180.01115.72
5.6.390.0200.00515.77
5.6.380.0220.00516.02
5.6.370.0190.00815.84
5.6.360.0260.00615.61
5.6.350.0170.00615.74
5.6.340.0130.00515.47
5.6.330.0100.00415.89
5.6.320.0140.00415.84
5.6.310.0160.00515.68
5.6.300.0180.00415.70
5.6.290.0110.00215.86
5.6.280.0120.00415.90
5.6.270.0110.00415.90
5.6.260.0230.00715.81
5.6.250.0250.00415.79
5.6.240.0250.00615.91
5.6.230.0230.00815.90
5.6.220.0280.00315.93
5.6.210.0240.00615.82
5.6.200.0200.00915.90
5.6.190.0260.00715.81
5.6.180.0250.00715.84
5.6.170.0240.00615.85
5.6.160.0260.00415.98
5.6.150.0230.00716.01
5.6.140.0240.00815.79
5.6.130.0240.00915.57
5.6.120.0190.00515.78
5.6.110.0220.00715.89
5.6.100.0260.00515.78
5.6.90.0250.00415.61
5.6.80.0230.00715.95
5.6.70.0200.00415.76
5.6.60.0130.00115.89
5.6.50.0130.00215.82
5.6.40.0120.00215.93
5.6.30.0080.00515.88
5.6.20.0180.00815.64
5.6.10.0210.00815.64
5.6.00.0230.00315.78
5.5.380.0210.00515.80
5.5.370.0250.00415.78
5.5.360.0230.00715.49
5.5.350.0180.01215.56
5.5.340.0240.00515.74
5.5.330.0260.00715.59
5.5.320.0280.00415.61
5.5.310.0250.00415.43
5.5.300.0190.01015.74
5.5.290.0290.00815.74
5.5.280.0190.00515.68
5.5.270.0250.00515.78
5.5.260.0190.01015.53
5.5.250.0270.00915.80
5.5.240.0230.00416.00
5.5.230.0110.00315.69
5.5.220.0110.00215.68
5.5.210.0140.00515.91
5.5.200.0120.00215.62
5.5.190.0170.01115.59
5.5.180.0260.00415.72
5.5.170.0230.00715.67
5.5.160.0240.00515.54
5.5.150.0220.00815.65
5.5.140.0140.01215.49
5.5.130.0190.00415.66
5.5.120.0220.00515.36
5.5.110.0210.00715.50
5.5.100.0200.00815.62
5.5.90.0230.00515.74
5.5.80.0230.00715.74
5.5.70.0230.00615.84
5.5.60.0190.00715.90
5.5.50.0220.00815.84
5.5.40.0230.00715.96
5.5.30.0160.00715.74
5.5.20.0210.00515.84
5.5.10.0230.00515.84
5.5.00.0230.00615.64
5.4.450.0190.00714.66
5.4.440.0210.00414.66
5.4.430.0200.00214.66
5.4.420.0210.00214.66
5.4.410.0200.00414.66
5.4.400.0140.00614.66
5.4.390.0140.00514.66
5.4.380.0120.00114.66
5.4.370.0100.00114.66
5.4.360.0150.00514.66
5.4.350.0180.00514.66
5.4.340.0160.00514.66
5.4.330.0170.00514.66
5.4.320.0200.00514.66
5.4.310.0180.00414.66
5.4.300.0210.00214.66
5.4.290.0190.00314.66
5.4.280.0210.00414.66
5.4.270.0170.00614.66
5.4.260.0200.00214.66
5.4.250.0170.00214.66
5.4.240.0190.00514.66
5.4.230.0180.00714.66
5.4.220.0160.00514.66
5.4.210.0130.00514.66
5.4.200.0200.00314.66
5.4.190.0180.00514.66
5.4.180.0210.00314.66
5.4.170.0170.00514.66
5.4.160.0200.00214.66
5.4.150.0180.00614.66
5.4.140.0170.00514.66
5.4.130.0180.00514.66
5.4.120.0140.00814.66
5.4.110.0180.00614.66
5.4.100.0150.00814.66
5.4.90.0180.00614.66
5.4.80.0160.00514.66
5.4.70.0130.00514.66
5.4.60.0180.00314.66
5.4.50.0190.00414.66
5.4.40.0160.00614.66
5.4.30.0170.00614.66
5.4.20.0190.00314.66
5.4.10.0180.00414.66
5.4.00.0180.00414.66
5.3.290.0180.00514.66
5.3.280.0170.00714.66
5.3.270.0210.00414.66
5.3.260.0150.00814.66
5.3.250.0170.00614.66
5.3.240.0170.00614.66
5.3.230.0170.00714.66
5.3.220.0170.00914.66
5.3.210.0160.00514.66
5.3.200.0160.00314.66
5.3.190.0160.00514.66
5.3.180.0170.00514.66
5.3.170.0140.00914.66
5.3.160.0150.00914.66
5.3.150.0200.00414.66
5.3.140.0180.00514.66
5.3.130.0160.00614.66
5.3.120.0180.00714.66
5.3.110.0170.00514.66
5.3.100.0140.00814.66
5.3.90.0160.00614.66
5.3.80.0180.00814.66
5.3.70.0200.00414.66
5.3.60.0150.00814.66
5.3.50.0180.00414.66
5.3.40.0140.00714.66
5.3.30.0160.00714.66
5.3.20.0160.00614.66
5.3.10.0130.00414.66
5.3.00.0120.00514.66
5.2.170.0110.00514.66
5.2.160.0120.00714.66
5.2.150.0140.00414.66
5.2.140.0120.00614.66
5.2.130.0130.00514.66
5.2.120.0120.00714.66
5.2.110.0140.00714.66
5.2.100.0180.00614.66
5.2.90.0140.00514.66
5.2.80.0130.00314.66
5.2.70.0130.00514.66
5.2.60.0130.00314.66
5.2.50.0120.00414.66
5.2.40.0090.00614.66
5.2.30.0110.00414.66
5.2.20.0140.00414.66
5.2.10.0110.00714.66
5.2.00.0140.00514.66
5.1.60.0090.00714.66
5.1.50.0130.00414.66
5.1.40.0100.00614.66
5.1.30.0150.00214.66
5.1.20.0120.00514.66
5.1.10.0110.00614.66
5.1.00.0110.00514.66
5.0.50.0070.00614.66
5.0.40.0080.00614.66
5.0.30.0100.00414.66
5.0.20.0100.00514.66
5.0.10.0100.00414.66
5.0.00.0110.00414.66
4.4.90.0090.00114.66
4.4.80.0060.00414.66
4.4.70.0050.00414.66
4.4.60.0080.00114.66
4.4.50.0070.00214.66
4.4.40.0080.00114.66
4.4.30.0090.00114.66
4.4.20.0080.00114.66
4.4.10.0070.00314.66
4.4.00.0080.00214.66
4.3.110.0060.00314.66
4.3.100.0070.00214.66
4.3.90.0060.00314.66
4.3.80.0060.00314.66
4.3.70.0060.00214.66
4.3.60.0080.00114.66
4.3.50.0060.00314.66
4.3.40.0060.00314.66
4.3.30.0070.00014.66
4.3.20.0050.00314.66
4.3.10.0050.00214.66
4.3.00.0060.00114.66

preferences:
69.36 ms | 2760 KiB | 5 Q