3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "racecar"; $pal = ""; for($a=0; $a<(strlen($str)-1); $a++) { for($z=0; $z<strlen($str); $z++) { $subs = substr($str, $a, $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.60.0120.00616.50
8.3.50.0130.00822.05
8.3.40.0070.01018.77
8.3.30.0040.01119.05
8.3.20.0000.00720.16
8.3.10.0070.00021.78
8.3.00.0040.00419.13
8.2.180.0110.00418.16
8.2.170.0110.00422.96
8.2.160.0110.00320.44
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00022.26
8.2.110.0050.00520.58
8.2.100.0030.01019.45
8.2.90.0090.00019.21
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0080.00017.93
8.2.50.0050.00318.10
8.2.40.0040.00420.60
8.2.30.0020.00519.16
8.2.20.0030.00617.73
8.2.10.0080.00018.08
8.2.00.0020.00517.77
8.1.280.0070.01325.92
8.1.270.0060.00323.88
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00622.21
8.1.230.0040.00717.77
8.1.220.0040.00417.76
8.1.210.0080.00018.77
8.1.200.0030.00517.35
8.1.190.0050.00517.22
8.1.180.0040.00420.15
8.1.170.0040.00418.58
8.1.160.0030.00318.88
8.1.150.0000.00820.00
8.1.140.0060.00317.34
8.1.130.0030.00317.89
8.1.120.0040.00417.36
8.1.110.0000.00817.34
8.1.100.0050.00317.33
8.1.90.0030.00317.46
8.1.80.0000.00717.30
8.1.70.0040.00417.40
8.1.60.0030.00717.47
8.1.50.0030.00617.39
8.1.40.0040.00417.43
8.1.30.0000.00817.51
8.1.20.0030.00517.59
8.1.10.0000.00817.36
8.1.00.0050.00217.45
8.0.300.0000.00818.77
8.0.290.0060.00316.75
8.0.280.0030.00318.43
8.0.270.0000.00717.21
8.0.260.0030.00317.24
8.0.250.0030.00316.98
8.0.240.0000.00817.02
8.0.230.0000.00716.83
8.0.220.0000.00716.95
8.0.210.0000.00716.87
8.0.200.0000.00716.77
8.0.190.0070.00016.91
8.0.180.0000.00816.93
8.0.170.0000.00716.90
8.0.160.0070.00016.82
8.0.150.0000.00716.82
8.0.140.0000.00816.88
8.0.130.0030.00313.32
8.0.120.0050.00316.74
8.0.110.0000.00716.86
8.0.100.0060.00316.98
8.0.90.0040.00417.00
8.0.80.0000.01816.76
8.0.70.0000.00816.70
8.0.60.0030.00516.99
8.0.50.0050.00216.94
8.0.30.0090.00917.15
8.0.20.0100.00817.40
8.0.10.0000.00817.02
8.0.00.0120.01216.77
7.4.330.0060.00015.00
7.4.320.0030.00316.48
7.4.300.0050.00216.48
7.4.290.0000.00716.58
7.4.280.0040.00416.47
7.4.270.0000.00716.55
7.4.260.0000.00716.43
7.4.250.0040.00416.40
7.4.240.0070.00116.49
7.4.230.0000.00716.24
7.4.220.0100.00716.51
7.4.210.0090.00516.52
7.4.200.0030.00316.68
7.4.190.0040.00416.39
7.4.160.0090.00616.32
7.4.150.0090.00917.40
7.4.140.0110.01017.86
7.4.130.0130.01016.53
7.4.120.0110.00816.57
7.4.110.0170.00416.25
7.4.100.0170.00016.50
7.4.90.0120.00616.52
7.4.80.0090.00919.39
7.4.70.0060.01016.34
7.4.60.0160.00016.39
7.4.50.0000.00816.32
7.4.40.0060.01016.42
7.4.30.0120.00916.45
7.4.00.0070.01014.85
7.3.330.0000.00713.16
7.3.320.0030.00313.16
7.3.310.0000.00816.32
7.3.300.0000.00716.34
7.3.290.0090.00616.32
7.3.280.0090.00716.28
7.3.270.0090.00917.40
7.3.260.0130.00716.43
7.3.250.0170.00616.29
7.3.240.0060.01116.37
7.3.230.0070.01016.54
7.3.210.0090.00916.40
7.3.200.0130.01019.39
7.3.190.0160.00316.56
7.3.180.0100.00616.57
7.3.170.0030.01216.27
7.3.160.0120.00316.40
7.3.120.0060.01014.81
7.3.110.0050.01015.08
7.3.100.0070.00614.62
7.3.90.0050.01014.87
7.3.80.0060.00714.94
7.3.70.0030.00814.96
7.3.60.0050.00814.84
7.3.50.0090.00614.80
7.3.40.0030.00914.83
7.3.30.0030.01214.85
7.3.20.0060.00516.72
7.3.10.0050.00816.63
7.3.00.0070.00516.57
7.2.330.0150.00416.54
7.2.320.0090.01516.62
7.2.310.0030.01516.41
7.2.300.0040.01616.54
7.2.290.0080.01016.51
7.2.250.0050.01214.98
7.2.240.0070.01114.91
7.2.230.0050.01015.09
7.2.220.0050.00815.09
7.2.210.0060.00614.98
7.2.200.0040.01015.07
7.2.190.0020.01215.05
7.2.180.0090.00714.87
7.2.170.0080.00814.86
7.2.00.0000.01219.38
7.1.330.0050.01015.75
7.1.320.0070.00415.80
7.1.310.0070.00815.89
7.1.300.0080.00615.72
7.1.290.0050.00815.90
7.1.280.0050.00715.84
7.1.270.0070.00415.79
7.1.260.0110.00315.80
7.1.100.0040.00718.17
7.1.70.0000.01017.25
7.1.60.0100.00319.46
7.1.50.0130.01034.82
7.1.00.0000.08022.45
7.0.200.0070.00316.63
7.0.140.0000.07721.93
7.0.60.0030.07019.92
7.0.50.0100.05017.79
7.0.40.0170.03720.30
7.0.30.0270.06720.13
7.0.20.0130.04320.07
7.0.10.0130.06720.30
7.0.00.0100.08020.17
5.6.280.0030.07020.91
5.6.210.0170.07320.76
5.6.200.0070.07718.18
5.6.190.0070.08320.77
5.6.180.0130.08320.61
5.6.170.0370.08020.38
5.6.160.0030.04320.71
5.6.150.0070.08318.12
5.6.140.0000.05318.11
5.6.130.0030.04018.11
5.6.120.0070.04321.10
5.6.110.0130.06720.97
5.6.100.0070.08020.97
5.6.90.0100.08021.00
5.6.80.0030.07020.36
5.5.350.4100.04020.29
5.5.340.0100.07717.95
5.5.330.0170.05020.32
5.5.320.0370.03020.27
5.5.310.0170.07720.41
5.5.300.0070.07718.00
5.5.290.0070.07717.91
5.5.280.0130.03720.96
5.5.270.0030.05320.95
5.5.260.0130.08020.86
5.5.250.0130.05320.58
5.5.240.0070.07720.26
5.4.450.0270.04719.57
5.4.440.0300.07319.22
5.4.430.0200.04719.20
5.4.420.0370.05019.42
5.4.410.0300.05719.28
5.4.400.0200.06319.08
5.4.390.0200.06019.22
5.4.380.0170.07719.16
5.4.370.0200.04319.13
5.4.360.0230.05019.13
5.4.350.0200.04718.93
5.4.340.0230.04018.79
5.4.320.0230.07019.09
5.4.310.0370.05719.09
5.4.300.0200.08019.24
5.4.290.0230.05718.80
5.4.280.0330.06319.15
5.4.270.0200.05018.76
5.4.260.0230.03718.88
5.4.250.0170.04319.23
5.4.240.0230.05719.09
5.4.230.0200.05019.08
5.4.220.0400.06319.17
5.4.210.0200.05719.24
5.4.200.0130.06018.88
5.4.190.0200.07019.23
5.4.180.0200.07718.92
5.4.170.0170.07319.12
5.4.160.0200.04719.07
5.4.150.0230.04719.14
5.4.140.0330.05016.31
5.4.130.0230.06316.25
5.4.120.0330.06016.25
5.4.110.0430.05716.23
5.4.100.0230.05316.20
5.4.90.0230.06316.45
5.4.80.0200.05316.04
5.4.70.0200.04016.27
5.4.60.0330.05316.20
5.4.50.0270.06316.36
5.4.40.0230.07016.27
5.4.30.0230.04316.18
5.4.20.0130.03716.36
5.4.10.0300.07016.31
5.4.00.0170.05015.99
5.3.290.0370.05014.57
5.3.280.0300.06714.44
5.3.270.0200.05014.45
5.3.260.0230.06314.55
5.3.250.0200.05014.55
5.3.240.0270.07314.65
5.3.230.0200.05714.47
5.3.220.0200.05014.66
5.3.210.0230.05314.51
5.3.200.0270.06314.43
5.3.190.0300.04314.47
5.3.180.0330.06714.47
5.3.170.0230.07014.50
5.3.160.0230.03314.53
5.3.150.0230.06314.54
5.3.140.0270.07314.40
5.3.130.0300.06714.40
5.3.120.0230.04714.38
5.3.110.0130.04314.42
5.3.100.0230.05713.98
5.3.90.0330.05013.96
5.3.80.0330.04014.05
5.3.70.0330.06013.79
5.3.60.0300.05013.98
5.3.50.0270.06713.90
5.3.40.0230.04013.77
5.3.30.0230.06313.71
5.3.20.0230.03313.54
5.3.10.0200.07013.56
5.3.00.0200.06713.58
5.2.170.0230.04011.77
5.2.160.0270.05011.77
5.2.150.0170.03711.77
5.2.140.0230.03311.77
5.2.130.0200.04011.77
5.2.120.0330.03011.77
5.2.110.0270.03011.77
5.2.100.0230.06011.77
5.2.90.0170.03711.77
5.2.80.0130.06311.77
5.2.70.0270.04011.77
5.2.60.0200.03711.77
5.2.50.0200.05711.77
5.2.40.0130.05311.77
5.2.30.0170.03711.77
5.2.20.0100.05011.77
5.2.10.0230.04011.77
5.2.00.0170.04011.77
5.1.60.0270.04711.77
5.1.50.0100.03311.77
5.1.40.0200.04711.77
5.1.30.0230.03711.77
5.1.20.0100.06011.77
5.1.10.0370.02011.77
5.1.00.0230.03011.77
5.0.50.0100.04011.77
5.0.40.0070.03011.77
5.0.30.0070.05011.77
5.0.20.0070.03011.77
5.0.10.0100.04011.77
5.0.00.0100.03711.77
4.4.90.0070.03011.77
4.4.80.0030.03311.77
4.4.70.0130.02311.77
4.4.60.0070.02311.77
4.4.50.0070.02711.77
4.4.40.0070.03311.77
4.4.30.0030.02011.77
4.4.20.0130.02711.77
4.4.10.0100.03311.77
4.4.00.0070.03311.77
4.3.110.0030.02311.77
4.3.100.0100.02311.77
4.3.90.0130.02011.77
4.3.80.0100.05011.77
4.3.70.0030.02311.77
4.3.60.0070.02011.77
4.3.50.0100.03011.77
4.3.40.0070.04711.77
4.3.30.0030.03711.77
4.3.20.0030.03311.77
4.3.10.0030.02011.77
4.3.00.0030.02711.77

preferences:
49.66 ms | 401 KiB | 5 Q