3v4l.org

run code in 300+ PHP versions simultaneously
<?php function IsCasiPalindromo($str){ $count = 0; $idx1 = 0; $idx2 = strlen($str)-1; while($idx1 <= $idx2){ if($str[$idx1] != $str[$idx2]){ $count++; } $idx1++; $idx2--; } return ($count<=1); } echo IsCasiPalindromo("abccba") . '<br>'; echo IsCasiPalindromo("abccbx") . '<br>'; echo IsCasiPalindromo("abccfg") . '<br>';

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.4.20.0170.00317.54
8.4.10.0060.00317.86
8.3.140.0040.01416.68
8.3.130.0060.00316.56
8.3.120.0060.00318.96
8.3.110.0040.01116.53
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0040.00416.75
8.3.70.0120.00618.31
8.3.60.0110.00416.63
8.3.50.0100.01221.92
8.3.40.0110.00418.85
8.3.30.0140.00718.59
8.3.20.0070.00020.25
8.3.10.0050.00323.61
8.3.00.0160.00319.25
8.2.260.0120.00316.56
8.2.250.0030.01416.43
8.2.240.0040.00417.14
8.2.230.0080.00820.94
8.2.220.0060.00337.54
8.2.210.0130.00626.77
8.2.200.0110.00016.75
8.2.190.0070.01416.63
8.2.180.0080.01216.63
8.2.170.0090.01322.96
8.2.160.0030.01020.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0000.00720.66
8.2.110.0090.00022.43
8.2.100.0080.00417.97
8.2.90.0060.00320.47
8.2.80.0050.00317.97
8.2.70.0060.00318.05
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0040.00418.30
8.2.30.0050.00219.97
8.2.20.0030.00617.76
8.2.10.0040.00418.15
8.2.00.0040.00418.01
8.1.310.0080.00018.56
8.1.300.0060.00916.05
8.1.290.0060.00618.88
8.1.280.0140.00025.92
8.1.270.0060.00323.91
8.1.260.0100.00726.35
8.1.250.0080.00028.09
8.1.240.0090.00023.86
8.1.230.0070.00422.20
8.1.220.0060.00317.77
8.1.210.0050.00318.98
8.1.200.0040.00417.23
8.1.190.0000.00817.25
8.1.180.0060.00318.10
8.1.170.0000.00818.64
8.1.160.0040.00418.84
8.1.150.0050.00218.82
8.1.140.0040.00419.59
8.1.130.0050.00217.59
8.1.120.0000.00717.47
8.1.110.0040.00417.41
8.1.100.0000.00717.41
8.1.90.0080.00017.47
8.1.80.0030.00517.47
8.1.70.0000.00717.38
8.1.60.0040.00417.55
8.1.50.0090.00017.50
8.1.40.0000.00817.43
8.1.30.0000.00917.67
8.1.20.0040.00417.66
8.1.10.0040.00417.59
8.1.00.0000.00717.57
8.0.300.0030.00319.89
8.0.290.0060.00316.63
8.0.280.0050.00318.42
8.0.270.0000.00717.19
8.0.260.0040.00417.28
8.0.250.0030.00316.98
8.0.240.0050.00316.86
8.0.230.0000.00717.01
8.0.220.0040.00416.88
8.0.210.0000.00816.82
8.0.200.0030.00316.92
8.0.190.0070.00016.99
8.0.180.0000.00716.89
8.0.170.0030.00516.76
8.0.160.0070.00016.89
8.0.150.0000.00816.77
8.0.140.0040.00416.88
8.0.130.0000.00813.41
8.0.120.0000.00816.86
8.0.110.0000.00716.82
8.0.100.0040.00416.80
8.0.90.0030.00316.80
8.0.80.0060.01016.83
8.0.70.0020.00516.78
8.0.60.0080.00016.91
8.0.50.0070.00016.83
8.0.30.0060.01116.95
8.0.20.0110.00817.40
8.0.10.0050.00316.88
8.0.00.0130.00916.64
7.4.330.0050.00016.82
7.4.320.0000.00716.54
7.4.300.0030.00316.64
7.4.290.0030.00516.56
7.4.280.0000.00716.63
7.4.270.0070.00016.62
7.4.260.0000.00716.50
7.4.250.0030.00516.58
7.4.240.0020.00516.53
7.4.230.0070.00016.63
7.4.220.0130.01316.62
7.4.210.0070.00916.57
7.4.200.0000.00716.69
7.4.160.0070.01016.58
7.4.150.0090.00917.40
7.4.140.0080.01117.86
7.4.130.0110.00516.51
7.4.120.0090.01316.56
7.4.110.0190.00016.32
7.4.100.0030.01316.59
7.4.90.0140.00316.53
7.4.80.0060.00919.39
7.4.70.0130.00316.61
7.4.60.0070.01116.54
7.4.50.0040.01116.30
7.4.40.0110.00716.58
7.4.30.0100.00716.39
7.4.10.0070.01316.47
7.4.00.0090.00715.64
7.3.330.0000.00613.34
7.3.320.0070.00013.39
7.3.310.0000.00716.32
7.3.300.0000.00716.39
7.3.290.0030.00316.25
7.3.280.0090.00716.40
7.3.270.0100.00717.40
7.3.260.0110.01116.59
7.3.250.0120.00916.42
7.3.240.0110.00716.48
7.3.230.0110.00616.65
7.3.210.0160.00016.54
7.3.200.0080.00816.34
7.3.190.0090.01216.47
7.3.180.0070.00716.64
7.3.170.0180.00416.56
7.3.160.0080.00816.48
7.3.130.0080.01116.63
7.3.120.0080.00915.68
7.3.110.0090.00315.46
7.3.100.0080.00715.59
7.3.90.0080.00515.65
7.3.80.0030.01015.53
7.3.70.0030.01215.47
7.3.60.0070.00515.50
7.3.50.0080.00715.63
7.3.40.0080.00715.59
7.3.30.0070.00715.63
7.3.20.0070.00517.28
7.3.10.0030.01117.50
7.3.00.0050.00717.08
7.2.330.0100.01016.71
7.2.320.0090.00916.56
7.2.310.0060.01316.52
7.2.300.0070.01016.55
7.2.290.0070.01016.54
7.2.260.0070.00816.48
7.2.250.0030.01616.75
7.2.240.0110.00515.96
7.2.230.0010.01315.89
7.2.220.0120.00315.78
7.2.210.0060.01015.88
7.2.200.0040.00915.84
7.2.190.0050.01215.84
7.2.180.0030.01415.86
7.2.170.0070.00715.73
7.2.160.0080.00815.96
7.2.150.0090.00917.67
7.2.140.0040.01217.79
7.2.130.0070.00717.41
7.2.120.0080.00617.46
7.2.110.0070.00917.26
7.2.100.0060.01017.39
7.2.90.0050.00817.42
7.2.80.0050.00917.26
7.2.70.0040.01017.48
7.2.60.0060.00817.25
7.2.50.0040.01017.48
7.2.40.0030.01017.41
7.2.30.0050.00817.35
7.2.20.0060.00417.34
7.2.10.0070.00817.40
7.2.00.0040.00918.01
7.1.330.0050.01116.64
7.1.320.0050.00816.28
7.1.310.0120.00316.55
7.1.300.0040.01116.77
7.1.290.0090.00416.59
7.1.280.0050.00916.52
7.1.270.0050.00716.58
7.1.260.0100.00216.61
7.1.250.0080.00716.39
7.1.240.0090.00516.34
7.1.230.0060.00816.25
7.1.220.0110.00316.70
7.1.210.0040.00616.44
7.1.200.0030.01016.23
7.1.190.0020.00916.43
7.1.180.0020.01216.58
7.1.170.0080.00416.66
7.1.160.0070.00516.56
7.1.150.0040.00716.54
7.1.140.0070.00516.40
7.1.130.0040.00716.43
7.1.120.0050.00516.55
7.1.110.0050.00716.57
7.1.100.0200.00716.36
7.1.90.0080.00516.28
7.1.80.0090.00116.52
7.1.70.0040.00616.65
7.1.60.0100.00817.34
7.1.50.0040.01316.69
7.1.40.0060.00816.45
7.1.30.0090.00416.50
7.1.20.0040.00916.62
7.1.10.0070.00716.56
7.1.00.0070.03018.42
7.0.330.0020.01116.27
7.0.320.0090.00516.13
7.0.310.0040.00616.02
7.0.300.0070.00416.24
7.0.290.0030.00816.15
7.0.280.0050.00616.01
7.0.270.0020.00916.09
7.0.260.0060.00816.21
7.0.250.0030.01016.14
7.0.240.0040.00816.23
7.0.230.0080.00516.21
7.0.220.0050.00516.18
7.0.210.0050.00616.23
7.0.200.0050.00416.37
7.0.190.0020.00916.05
7.0.180.0090.00616.11
7.0.170.0070.00716.24
7.0.160.0050.00716.24
7.0.150.0080.00616.06
7.0.140.0070.00316.19
7.0.130.0060.00616.32
7.0.120.0060.00816.23
7.0.110.0060.00816.17
7.0.100.0070.00716.00
7.0.90.0070.00516.24
7.0.80.0060.00716.24
7.0.70.0050.00716.21
7.0.60.0120.03117.44
7.0.50.0050.03216.77
7.0.40.0030.03516.23
7.0.30.0020.02616.20
7.0.20.0140.03116.08
7.0.10.0080.03216.18
7.0.00.0020.02316.22
5.6.400.0110.00515.82
5.6.390.0070.00716.09
5.6.380.0060.00815.00
5.6.370.0050.01114.98
5.6.360.0070.00615.12
5.6.350.0050.01114.95
5.6.340.0030.00915.28
5.6.330.0100.00515.32
5.6.320.0030.00814.98
5.6.310.0080.00515.13
5.6.300.0050.00515.28
5.6.290.0070.00515.12
5.6.280.0030.02317.09
5.6.270.0040.00715.17
5.6.260.0020.01114.95
5.6.250.0030.00815.16
5.6.240.0060.00415.10
5.6.230.0020.01315.17
5.6.220.0070.00515.04
5.6.210.0060.02916.93
5.6.200.0060.01916.13
5.6.190.0040.02416.85
5.6.180.0200.02517.04
5.6.170.0130.03116.74
5.6.160.0030.02616.86
5.6.150.0070.03316.15
5.6.140.0050.03416.11
5.6.130.0130.02416.11
5.6.120.0100.03117.30
5.6.110.0060.03417.05
5.6.100.0080.02817.13
5.6.90.0050.03517.10
5.6.80.0070.02317.02
5.6.70.0040.00815.12
5.6.60.0070.00615.09
5.6.50.0050.00714.75
5.6.40.0060.00814.99
5.6.30.0060.00514.88
5.6.20.0060.01015.30
5.6.10.0080.00815.26
5.6.00.0050.00714.88
5.5.380.0020.01113.47
5.5.370.0030.00913.53
5.5.360.0070.00313.47
5.5.350.0080.01515.82
5.5.340.0030.03314.96
5.5.330.0020.02515.80
5.5.320.0050.01915.65
5.5.310.0120.01515.83
5.5.300.0030.02115.02
5.5.290.0050.03215.05
5.5.280.0070.02316.01
5.5.270.0060.02115.92
5.5.260.0050.03215.94
5.5.250.0120.02615.90
5.5.240.0090.02515.71
5.5.230.0070.00513.49
5.5.220.0090.00313.48
5.5.210.0050.00513.48
5.5.200.0020.00913.37
5.5.190.0000.00913.56
5.5.180.0080.00513.43
5.5.170.0090.00513.51
5.5.160.0050.00813.51
5.5.150.0050.00713.46
5.5.140.0020.00913.53
5.5.130.0040.00413.48
5.5.120.0050.00613.42
5.5.110.0070.00313.59
5.5.100.0090.00313.43
5.5.90.0050.00813.51
5.5.80.0030.00713.36
5.5.70.0050.00513.57
5.5.60.0060.00213.51
5.5.50.0060.00113.38
5.5.40.0070.00613.55
5.5.30.0060.00513.41
5.5.20.0020.00713.53
5.5.10.0050.00813.47
5.5.00.0080.00413.49

preferences:
61.77 ms | 403 KiB | 5 Q