3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '1-2-3-4-5'; echo substr($str, strrpos($str, '-') + 1)."\n\n"; echo substr($str, strrpos($str, ';') + 1)."\n\n"; $str = '1-2-3-4-5'; if (($pos = strrpos($str, ';')) !== false) echo substr($str, $pos + 1); else echo $str;

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.01018.55
8.3.50.0120.00918.09
8.3.40.0100.00721.90
8.3.30.0110.00418.67
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.180.0040.01425.92
8.2.170.0210.00018.95
8.2.160.0070.00722.96
8.2.150.0030.00625.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00420.66
8.2.110.0080.00021.96
8.2.100.0120.00017.84
8.2.90.0060.00318.16
8.2.80.0060.00317.97
8.2.70.0040.00417.80
8.2.60.0050.00317.92
8.2.50.0070.00718.07
8.2.40.0000.00818.29
8.2.30.0050.00318.07
8.2.20.0000.00718.03
8.2.10.0000.00819.43
8.2.00.0050.00219.19
8.1.280.0060.01525.92
8.1.270.0100.00024.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00619.23
8.1.230.0040.00720.84
8.1.220.0030.00617.91
8.1.210.0080.00018.92
8.1.200.0030.00517.35
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0040.00418.59
8.1.160.0050.00218.91
8.1.150.0040.00418.75
8.1.140.0070.00018.90
8.1.130.0000.00920.07
8.1.120.0040.00417.37
8.1.110.0000.00817.48
8.1.100.0040.00417.48
8.1.90.0000.00717.37
8.1.80.0070.00017.41
8.1.70.0030.00317.47
8.1.60.0030.00517.62
8.1.50.0080.00017.43
8.1.40.0040.00417.45
8.1.30.0040.00417.64
8.1.20.0050.00217.55
8.1.10.0040.00417.52
8.1.00.0040.00417.46
8.0.300.0000.00720.07
8.0.290.0030.00516.75
8.0.280.0000.00718.45
8.0.270.0040.00418.16
8.0.260.0000.00718.50
8.0.250.0000.00617.00
8.0.240.0000.00717.07
8.0.230.0000.00716.94
8.0.220.0000.00716.86
8.0.210.0000.00716.94
8.0.200.0030.00617.00
8.0.190.0070.00017.02
8.0.180.0000.00717.02
8.0.170.0000.00816.88
8.0.160.0040.00417.01
8.0.150.0020.00516.95
8.0.140.0000.00816.81
8.0.130.0050.00013.36
8.0.120.0040.00416.93
8.0.110.0040.00416.81
8.0.100.0040.00416.96
8.0.90.0050.00216.95
8.0.80.0030.01416.95
8.0.70.0000.00716.94
8.0.60.0050.00216.90
8.0.50.0000.00716.77
8.0.30.0110.01116.95
8.0.20.0090.01017.18
8.0.10.0030.00517.09
8.0.00.0100.01016.73
7.4.330.0000.00415.55
7.4.320.0030.00316.65
7.4.300.0000.00716.59
7.4.290.0000.00716.42
7.4.280.0000.00816.44
7.4.270.0000.00716.54
7.4.260.0000.00816.58
7.4.250.0040.00416.58
7.4.240.0040.00416.54
7.4.230.0000.00716.56
7.4.220.0070.00016.43
7.4.210.0080.00816.60
7.4.200.0000.00816.68
7.4.130.0090.00916.44
7.4.120.0290.00316.32
7.4.110.0230.00516.59
7.4.100.0140.01416.41
7.4.90.0190.01116.47
7.4.80.0230.00816.47
7.4.70.0220.00616.61
7.4.60.0200.00816.46
7.4.50.0230.00716.55
7.4.40.0210.00716.36
7.4.30.0260.00316.43
7.4.20.0260.00316.36
7.4.10.0170.01316.35
7.4.00.0130.00915.85
7.3.330.0030.00316.09
7.3.320.0000.00513.23
7.3.310.0040.00416.25
7.3.300.0040.00416.30
7.3.290.0110.00816.32
7.3.260.0190.00316.56
7.3.240.0060.00916.55
7.3.230.0210.00816.29
7.3.220.0200.01016.34
7.3.210.0260.00416.40
7.3.200.0140.01516.34
7.3.190.0280.00316.37
7.3.180.0210.00916.60
7.3.170.0210.00816.41
7.3.160.0250.01016.51
7.3.150.0240.01216.52
7.3.140.0220.01016.39
7.3.130.0170.01316.30
7.3.120.0190.01416.43
7.3.110.0280.00016.54
7.3.100.0200.01416.30
7.3.90.0070.01016.27
7.3.80.0070.01516.32
7.3.70.0080.01116.34
7.3.60.0180.00016.36
7.3.50.0210.00616.41
7.3.40.0220.00716.36
7.3.30.0220.00716.51
7.3.20.0280.00416.39
7.3.10.0270.00716.32
7.3.00.0340.00016.31
7.2.340.0150.01516.59
7.2.330.0170.01316.57
7.2.320.0170.01116.65
7.2.310.0190.00916.43
7.2.300.0220.01016.46
7.2.290.0180.01216.41
7.2.280.0230.01216.68
7.2.270.0240.00716.57
7.2.260.0230.01016.69
7.2.250.0250.00716.53
7.2.240.0150.01516.49
7.2.230.0130.00816.62
7.2.220.0090.00916.62
7.2.210.0110.01116.74
7.2.200.0150.00716.52
7.2.190.0070.01016.37
7.2.180.0250.00416.70
7.2.170.0170.01316.61
7.2.160.0180.01116.46
7.2.150.0230.00816.56
7.2.140.0170.01716.60
7.2.130.0270.01316.55
7.2.120.0270.01116.55
7.2.110.0300.00416.54
7.2.100.0180.01616.45
7.2.90.0340.00316.57
7.2.80.0310.01116.68
7.2.70.0260.01916.54
7.2.60.0240.00816.71
7.2.50.0330.01416.59
7.2.40.0230.01116.53
7.2.30.0230.01016.64
7.2.20.0220.00816.61
7.2.10.0260.01316.45
7.2.00.0250.01316.51

preferences:
62.47 ms | 400 KiB | 5 Q