3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "racecar"; $pal = ""; for($a=0; $a<strlen($str); $a++) { for($z=0; $z<strlen($str); $z++) { $subs = substr($str, $a-1, $z); if( $subs == strrev($subs) and strlen($subs) > strlen($pal) ) { $pal = $subs; } } } echo $pal;

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.70.0090.00618.40
8.3.60.0120.00316.63
8.3.50.0250.00516.29
8.3.40.0090.00618.59
8.3.30.0140.00318.45
8.3.20.0050.00318.55
8.3.10.0050.00318.64
8.3.00.0080.00317.25
8.2.180.0080.01216.63
8.2.170.0100.01022.96
8.2.160.0150.00018.79
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0110.00326.16
8.2.120.0040.00420.81
8.2.110.0030.00622.07
8.2.100.0080.00417.72
8.2.90.0080.00017.75
8.2.80.0050.00318.69
8.2.70.0030.00517.63
8.2.60.0080.00017.63
8.2.50.0090.00017.93
8.2.40.0000.00919.95
8.2.30.0030.00617.68
8.2.20.0090.00317.47
8.2.10.0030.00617.73
8.2.00.0070.00217.78
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00023.96
8.1.230.0040.00819.10
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0030.00517.62
8.1.160.0040.00418.87
8.1.150.0040.00418.56
8.1.140.0000.00817.44
8.1.130.0000.00817.73
8.1.120.0040.00417.35
8.1.110.0070.00017.45
8.1.100.0020.00517.44
8.1.90.0040.00417.34
8.1.80.0040.00417.33
8.1.70.0000.00717.40
8.1.60.0030.00617.61
8.1.50.0050.00217.46
8.1.40.0030.00617.38
8.1.30.0040.00417.69
8.1.20.0090.00317.51
8.1.10.0040.00417.48
8.1.00.0030.00617.42
8.0.300.0060.00421.42
8.0.290.0000.00716.75
8.0.280.0030.00318.60
8.0.270.0000.00717.21
8.0.260.0000.00816.80
8.0.250.0040.00416.84
8.0.240.0040.00416.91
8.0.230.0070.00016.93
8.0.220.0030.00316.87
8.0.210.0080.00016.81
8.0.200.0000.00716.82
8.0.190.0040.00416.82
8.0.180.0070.00016.93
8.0.170.0080.00016.73
8.0.160.0000.00716.95
8.0.150.0040.00416.73
8.0.140.0000.00716.79
8.0.130.0050.00013.38
8.0.120.0060.00316.95
8.0.110.0000.00716.86
8.0.100.0040.00416.93
8.0.90.0040.00416.90
8.0.80.0060.00916.87
8.0.70.0050.00316.66
8.0.60.0040.00416.69
8.0.50.0040.00416.97
8.0.30.0110.00417.07
8.0.20.0110.00917.02
8.0.10.0070.00017.11
8.0.00.0080.01616.87
7.4.330.0020.00212.98
7.4.320.0030.00316.46
7.4.300.0030.00316.50
7.4.290.0060.00016.57
7.4.280.0040.00416.50
7.4.270.0000.00816.54
7.4.260.0030.00313.25
7.4.250.0090.00016.52
7.4.240.0040.00416.59
7.4.230.0000.00816.38
7.4.220.0090.00916.34
7.4.210.0070.01316.49
7.4.200.0050.00316.50
7.4.190.0080.00016.55
7.4.160.0060.01016.55
7.4.150.0110.00616.36
7.4.140.0070.01016.39
7.4.130.0080.01116.55
7.4.120.0000.01716.44
7.4.110.0030.01416.57
7.4.100.0030.01416.49
7.4.90.0070.01116.46
7.4.80.0090.01219.39
7.4.70.0070.01116.48
7.4.60.0100.00716.49
7.4.50.0070.00016.44
7.4.40.0030.01316.56
7.4.30.0130.00316.52
7.4.00.0150.00314.82
7.3.330.0040.00413.19
7.3.320.0050.00013.13
7.3.310.0070.00016.33
7.3.300.0000.00616.34
7.3.290.0070.00916.32
7.3.280.0090.00916.34
7.3.270.0090.00916.47
7.3.260.0120.00616.58
7.3.250.0120.01016.39
7.3.240.0110.01216.59
7.3.230.0090.01216.34
7.3.210.0060.01216.59
7.3.200.0090.01116.54
7.3.190.0070.01016.51
7.3.180.0120.00416.36
7.3.170.0160.00416.30
7.3.160.0130.00316.61
7.3.120.0000.01414.79
7.3.10.0070.00716.54
7.3.00.0100.00316.64
7.2.330.0060.01016.63
7.2.320.0100.01316.75
7.2.310.0060.01316.47
7.2.300.0070.01016.53
7.2.290.0060.01116.71
7.2.130.0000.01216.82
7.2.120.0060.00617.00
7.2.110.0040.01116.98
7.2.100.0100.00616.98
7.2.90.0100.00316.91
7.2.80.0080.00617.04
7.2.70.0050.00516.97
7.2.60.0030.01316.95
7.2.50.0030.01016.79
7.2.40.0120.00017.04
7.2.30.0120.00317.13
7.2.20.0040.00816.91
7.2.10.0090.00616.69
7.2.00.0090.00617.92
7.1.250.0050.00515.74
7.1.100.0030.01018.05
7.1.70.0000.00817.02
7.1.60.0100.01419.30
7.1.50.0100.00716.70
7.1.00.0030.03322.37
7.0.200.0080.00816.73
7.0.140.0030.07321.98
7.0.120.0000.04322.15
7.0.60.0100.08719.96
7.0.50.0030.05317.87
7.0.40.0000.04720.23
7.0.30.0300.05720.30
7.0.20.0330.07720.00
7.0.10.0270.07320.30
7.0.00.0000.04320.12
5.6.280.0000.07720.81
5.6.210.0030.08020.52
5.6.200.0100.06718.09
5.6.190.0070.05020.67
5.6.180.0400.06320.37
5.6.170.0200.05020.51
5.6.160.0070.08720.52
5.6.150.0070.07718.11
5.6.140.0100.04018.18
5.6.130.0100.07318.15
5.6.120.0070.05021.01
5.6.110.0100.08721.09
5.6.100.0130.06020.98
5.6.90.0130.08021.01
5.6.80.0170.06320.37
5.6.70.0270.07320.52
5.5.350.0270.06720.52
5.5.340.0000.04717.96
5.5.330.0100.08320.36
5.5.320.0030.08720.41
5.5.310.0200.05320.12
5.5.300.0100.08017.92
5.5.290.0000.05318.00
5.5.280.0030.07720.73
5.5.270.0100.07720.77
5.5.260.0030.04020.79
5.5.250.0030.04020.46
5.5.240.0070.03720.26
5.4.450.0100.07719.50
5.4.440.0030.08319.24
5.4.430.0070.07719.49
5.4.420.0130.05019.43
5.4.410.0070.08019.20
5.4.400.0030.04019.10
5.4.390.0070.04019.14
5.4.380.0030.04019.16
5.4.370.0130.04019.08
5.4.360.0170.05318.91
5.4.350.0100.07019.08
5.4.340.0070.07719.16
5.4.320.0070.08019.18
5.4.310.0030.06019.16
5.4.300.0030.04719.12
5.4.290.0030.04019.08
5.4.280.0230.06019.15
5.4.270.0030.06719.13
5.4.260.0070.03719.17
5.4.250.0170.03718.91
5.4.240.0070.07719.13
5.4.230.0100.06718.80
5.4.220.0070.04719.19
5.4.210.0100.04019.08
5.4.200.0030.08019.13
5.4.190.0100.06319.07
5.4.180.0100.07319.13
5.4.170.0130.06719.01
5.4.160.0130.07318.98
5.4.150.0100.07319.06
5.4.140.0130.03316.29
5.4.130.0030.05016.24
5.4.120.0070.06716.28
5.4.110.0070.07316.37
5.4.100.0030.06716.24
5.4.90.0070.05016.25
5.4.80.0100.06716.25
5.4.70.0030.03716.22
5.4.60.0100.05316.24
5.4.50.0130.06016.23
5.4.40.0130.04716.38
5.4.30.0000.04016.32
5.4.20.0070.03716.38
5.4.10.0130.07316.38
5.4.00.0130.06015.67
5.3.290.0130.07014.56
5.3.280.0070.07714.40
5.3.270.0070.07314.56
5.3.260.0030.08014.54
5.3.250.0100.04714.58
5.3.240.0070.03714.57
5.3.230.0100.05714.47
5.3.220.0000.06714.54
5.3.210.0070.04714.58
5.3.200.0030.08014.58
5.3.190.0070.07014.59
5.3.180.0100.07314.50
5.3.170.0100.04314.50
5.3.160.0030.06314.49
5.3.150.0100.07314.52
5.3.140.0100.07314.48
5.3.130.0070.07714.47
5.3.120.0070.07314.43
5.3.110.0100.06014.47
5.3.100.0100.04713.96
5.3.90.0030.05313.98
5.3.80.0070.06013.95
5.3.70.0030.07714.03
5.3.60.0100.06713.79
5.3.50.0030.06713.87
5.3.40.0070.05013.86
5.3.30.0100.06014.01
5.3.20.0100.04013.65
5.3.10.0030.03713.62
5.3.00.0070.04013.45
5.2.170.0100.05311.04
5.2.160.0100.02311.00
5.2.150.0030.04011.06
5.2.140.0100.05711.12
5.2.130.0070.06711.09
5.2.120.0000.03310.98
5.2.110.0000.04711.04
5.2.100.0100.02711.09
5.2.90.0100.03011.11
5.2.80.0070.06010.91
5.2.70.0100.04311.05
5.2.60.0030.04311.03
5.2.50.0170.05010.99
5.2.40.0030.06710.87
5.2.30.0070.03710.87
5.2.20.0100.04310.85
5.2.10.0130.02710.85
5.2.00.0130.02310.74
5.1.60.0000.0609.99
5.1.50.0030.02310.03
5.1.40.0030.02710.02
5.1.30.0100.04010.18
5.1.20.0030.03710.35
5.1.10.0030.05710.01
5.1.00.0000.04010.13
5.0.50.0000.0308.56
5.0.40.0000.0238.38
5.0.30.0030.0578.29
5.0.20.0030.0338.26
5.0.10.0070.0308.14
5.0.00.0030.0378.07
4.4.90.0030.0338.02
4.4.80.0030.0178.02
4.4.70.0070.0238.02
4.4.60.0000.0178.02
4.4.50.0000.0378.02
4.4.40.0000.0278.02
4.4.30.0070.0308.02
4.4.20.0100.0138.02
4.4.10.0070.0138.02
4.4.00.0030.0478.02
4.3.110.0000.0378.02
4.3.100.0000.0378.02
4.3.90.0070.0308.02
4.3.80.0070.0508.02
4.3.70.0000.0378.02
4.3.60.0000.0278.02
4.3.50.0000.0308.02
4.3.40.0030.0408.02
4.3.30.0000.0208.02
4.3.20.0030.0308.02
4.3.10.0000.0278.02
4.3.00.0000.0378.02

preferences:
60.55 ms | 401 KiB | 5 Q