3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orig = 'welcome-to-your-world'; //$orig = 'welcome'; $parts = explode('-', $orig); if (1 < count($parts)) { usort($parts, function($a, $b) { return strlen($a) < strlen($b); }); $s1 = array_shift($parts); $s2 = array_shift($parts); } else { $s1 = $s2 = $orig; } echo $s1 . PHP_EOL . $s2;

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.0100.00718.68
8.3.50.0080.00618.04
8.3.40.0120.00318.67
8.3.30.0100.00718.71
8.3.20.0030.00520.48
8.3.10.0060.00319.91
8.3.00.0000.00723.61
8.2.180.0140.00718.46
8.2.170.0120.00322.96
8.2.160.0140.00020.44
8.2.150.0000.00824.18
8.2.140.0030.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00726.16
8.2.110.0060.00320.39
8.2.100.0140.00017.91
8.2.90.0050.00317.88
8.2.80.0050.00318.03
8.2.70.0000.00817.79
8.2.60.0040.00418.00
8.2.50.0040.00418.10
8.2.40.0000.00819.48
8.2.30.0040.00419.21
8.2.20.0000.00818.09
8.2.10.0040.00419.36
8.2.00.0000.00719.18
8.1.280.0090.00925.92
8.1.270.0000.00920.68
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00319.26
8.1.230.0130.00020.95
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0060.00317.13
8.1.180.0040.00418.10
8.1.170.0000.00818.56
8.1.160.0040.00418.95
8.1.150.0000.00718.80
8.1.140.0050.00320.76
8.1.130.0000.00720.14
8.1.120.0070.00017.42
8.1.110.0050.00317.39
8.1.100.0030.00317.46
8.1.90.0040.00417.39
8.1.80.0040.00417.46
8.1.70.0040.00417.45
8.1.60.0050.00317.47
8.1.50.0020.00517.55
8.1.40.0050.00317.49
8.1.30.0000.00717.50
8.1.20.0050.00617.54
8.1.10.0040.00417.41
8.1.00.0040.00717.51
8.0.300.0040.00419.56
8.0.290.0080.00016.75
8.0.280.0050.00318.44
8.0.270.0030.00317.17
8.0.260.0000.00620.07
8.0.250.0070.00017.03
8.0.240.0040.00416.89
8.0.230.0000.00916.99
8.0.220.0030.00316.97
8.0.210.0040.00416.94
8.0.200.0030.00316.92
8.0.190.0000.00716.90
8.0.180.0030.00616.97
8.0.170.0050.00316.89
8.0.160.0000.00716.95
8.0.150.0000.00716.86
8.0.140.0040.00416.88
8.0.130.0060.00013.31
8.0.120.0000.00716.95
8.0.110.0060.00316.96
8.0.100.0070.00016.94
8.0.90.0040.00417.02
8.0.80.0030.01316.90
8.0.70.0000.00816.99
8.0.60.0040.00416.80
8.0.50.0040.00416.80
8.0.30.0130.00517.11
8.0.20.0130.00617.11
8.0.10.0050.00316.95
8.0.00.0100.00816.90
7.4.330.0040.00015.55
7.4.320.0030.00316.52
7.4.300.0030.00316.48
7.4.290.0000.00716.38
7.4.280.0040.00416.50
7.4.270.0050.00316.51
7.4.260.0050.00013.21
7.4.250.0000.00716.54
7.4.240.0000.00716.41
7.4.230.0000.00716.40
7.4.220.0000.00716.52
7.4.210.0040.01216.63
7.4.200.0070.00016.67
7.4.130.0130.00316.45
7.4.120.0120.00616.68
7.4.110.0090.00916.53
7.4.100.0120.00616.38
7.4.90.0100.00716.51
7.4.80.0060.01019.39
7.4.70.0070.01016.45
7.4.60.0100.00716.38
7.4.50.0090.00316.39
7.4.40.0080.00816.45
7.4.10.0100.00715.05
7.4.00.0100.00715.03
7.3.330.0040.00416.21
7.3.320.0000.00513.11
7.3.310.0000.00716.42
7.3.300.0060.00016.21
7.3.290.0070.00016.36
7.3.280.0110.00716.42
7.3.260.0140.00516.37
7.3.230.0120.00916.62
7.3.210.0070.01016.36
7.3.200.0120.01116.25
7.3.190.0060.01416.24
7.3.180.0090.01016.58
7.3.170.0040.01216.63
7.3.160.0110.00716.62
7.3.130.0110.00315.01
7.3.120.0130.00614.75
7.3.110.0000.01814.84
7.3.100.0030.01014.71
7.3.90.0140.00314.91
7.3.80.0060.00514.76
7.3.70.0040.00814.69
7.3.60.0110.00314.65
7.3.50.0080.00714.80
7.3.40.0080.00514.84
7.3.30.0030.01414.67
7.3.20.0110.00515.75
7.3.10.0120.00415.76
7.3.00.0050.00915.85
7.2.330.0030.01416.59
7.2.320.0140.01016.51
7.2.310.0130.00316.84
7.2.300.0080.00816.79
7.2.290.0110.00516.65
7.2.260.0100.01015.11
7.2.250.0030.01014.73
7.2.240.0060.00915.12
7.2.230.0100.00715.02
7.2.220.0030.01015.20
7.2.210.0040.00914.85
7.2.200.0050.00915.00
7.2.190.0060.00914.88
7.2.180.0080.00615.22
7.2.170.0070.00715.01
7.2.160.0070.00915.04
7.2.150.0110.00716.10
7.2.140.0100.00515.95
7.2.130.0070.00715.82
7.2.120.0090.00616.08
7.2.110.0110.00416.05
7.2.100.0100.00715.97
7.2.90.0090.00916.04
7.2.80.0080.01016.15
7.2.70.0180.00215.99
7.2.60.0120.00916.17
7.2.50.0410.00916.12
7.2.40.0110.00616.17
7.2.30.0070.00716.09
7.2.20.0110.00315.90
7.2.10.0110.00615.90
7.2.00.0120.00516.05
7.1.330.0080.00815.70
7.1.320.0100.00715.55
7.1.310.0090.00614.95
7.1.300.0110.00814.75
7.1.290.0080.00914.85
7.1.280.0180.00214.87
7.1.270.0090.00814.85
7.1.260.0070.00714.64
7.1.250.0070.00514.65
7.1.240.0040.00715.48
7.1.230.0060.01215.81
7.1.220.0040.01115.86
7.1.210.0000.00915.52
7.1.200.0090.00615.89
7.1.190.0000.01515.85
7.1.180.0040.00715.60
7.1.170.0030.01415.87
7.1.160.0090.00615.62
7.1.150.0030.01215.79
7.1.140.0080.00415.57
7.1.130.0060.00315.83
7.1.120.0030.01215.66
7.1.110.0030.01415.68
7.1.100.0050.00315.91
7.1.90.0000.01215.74
7.1.80.0040.00415.87
7.1.70.0030.00915.81
7.1.60.0030.01015.76
7.1.50.0030.01015.82
7.1.40.0040.01115.94
7.1.30.0030.01015.79
7.1.20.0060.00915.82
7.1.10.0080.00015.81
7.1.00.0040.00815.78

preferences:
56.68 ms | 400 KiB | 5 Q