3v4l.org

run code in 300+ PHP versions simultaneously
<?php $textos[] = 'yuqkdp69yHryACb778mvZsbFegIBU#'; $textos[] = 'yuqk#p69yHryACb778mvZsbFigIBUh'; shuffle($textos); foreach ($textos as $texto) { $fim = []; for ($i = 0; $i < 10000; $i++) { $inicio = microtime(true); tem_simbolo_na_senha($texto); $fim[] = microtime(true) - $inicio; } echo $texto . ' demorou ' . array_sum($fim) / count($fim); echo PHP_EOL; } function tem_simbolo_na_senha($texto) { $texto = str_split($texto); foreach ($texto as $letra) { if ($letra == "#" || $letra == "@" || $letra == "%" || $letra == "&") { return true; } } return false; }

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)
7.4.10.0100.09015.26
7.4.00.0080.08015.36
7.3.130.0140.06714.91
7.3.120.0100.09014.90
7.3.110.0120.08814.89
7.3.100.0080.06114.86
7.3.90.0030.06414.99
7.3.80.0030.06615.02
7.3.70.0080.06514.96
7.3.60.0050.06114.98
7.3.50.0000.06614.92
7.3.40.0030.06615.13
7.3.30.0020.08714.96
7.3.20.0080.06416.45
7.3.10.0040.06316.64
7.3.00.0050.06316.42
7.2.260.0120.09715.21
7.2.250.0080.09015.27
7.2.240.0020.07715.36
7.2.230.0050.07615.31
7.2.220.0050.08015.18
7.2.210.0050.07815.41
7.2.200.0070.07615.34
7.2.190.0080.07615.23
7.2.180.0020.08015.31
7.2.170.0030.07715.25
7.2.160.0030.08815.16
7.2.150.0070.08216.80
7.2.140.0070.07316.87
7.2.130.0070.07516.80
7.2.120.0070.07016.83
7.2.110.0030.08416.89
7.2.100.0070.08216.89
7.2.90.0070.07216.97
7.2.80.0070.07416.79
7.2.70.0040.07816.90
7.2.60.0010.08216.84
7.2.50.0040.07317.02
7.2.40.0090.07217.06
7.2.30.0040.09016.91
7.2.20.0040.08016.90
7.2.10.0060.07517.00
7.2.00.0070.07616.82
7.1.330.0110.09215.82
7.1.320.0030.09915.82
7.1.310.0070.09115.74
7.1.300.0070.09515.76
7.1.290.0030.09715.58
7.1.280.0050.10615.79
7.1.270.0030.09915.62
7.1.260.0020.09715.68
7.1.250.0070.09915.70
7.1.240.0040.09415.78
7.1.230.0040.09715.71
7.1.220.0060.10515.65
7.1.210.0020.09815.54
7.1.200.0030.09415.65
7.1.190.0060.09615.70
7.1.180.0060.09515.85
7.1.170.0040.10015.65
7.1.160.0040.10015.67
7.1.150.0070.09715.72
7.1.140.0080.09815.74
7.1.130.0040.10615.61
7.1.120.0040.09415.77
7.1.110.0060.09915.78
7.1.100.0040.09515.83
7.1.90.0070.09715.74
7.1.80.0060.09915.60
7.1.70.0030.08916.14
7.1.60.0050.08516.04
7.1.50.0170.08920.25
7.1.40.0110.10020.13
7.1.30.0190.10219.94
7.1.20.0100.10020.07
7.1.10.0070.10015.41
7.1.00.0080.10415.51
7.0.330.0060.09315.27
7.0.320.0030.09615.33
7.0.310.0050.09415.43
7.0.300.0030.09715.13
7.0.290.0040.10215.30
7.0.280.0040.10215.35
7.0.270.0030.10615.32
7.0.260.0080.09115.22
7.0.250.0050.10215.30
7.0.240.0080.09515.39
7.0.230.0060.09215.43
7.0.220.0040.10015.31
7.0.210.0040.09815.43
7.0.200.0050.09415.67
7.0.190.0100.09815.36
7.0.180.0110.09815.24
7.0.170.0160.09915.19
7.0.160.0100.09515.18
7.0.150.0170.09715.19
7.0.140.0080.09315.30
7.0.130.0090.09515.37
7.0.120.0110.09415.20
7.0.110.0120.09815.19
7.0.100.0110.09115.07
7.0.90.0070.09615.20
7.0.80.0120.09015.19
7.0.70.0080.10115.22
7.0.60.0100.09115.14
7.0.50.0080.09315.28
7.0.40.0070.09513.82
7.0.30.0110.09413.79
7.0.20.0120.09413.77
7.0.10.0120.09713.86
7.0.00.0090.09413.73
5.6.400.0080.18315.66
5.6.390.0100.16915.50
5.6.380.0060.16915.69
5.6.370.0070.16515.54
5.6.360.0080.16015.89
5.6.350.0050.17515.60
5.6.340.0070.16715.70
5.6.330.0100.16315.50
5.6.320.0050.16416.00
5.6.310.0100.17415.53
5.6.300.0050.18415.81
5.6.290.0100.17315.74
5.6.280.0080.17215.56
5.6.270.0070.17315.67
5.6.260.0030.18815.60
5.6.250.0030.17915.49
5.6.240.0030.19415.76
5.6.230.0070.18315.81
5.6.220.0000.18015.72
5.6.210.0000.16915.51
5.6.200.0030.16715.35
5.6.190.0030.16415.60
5.6.180.0070.16315.45
5.6.170.0100.16615.41
5.6.160.0050.18015.71
5.6.150.0050.18115.67
5.6.140.0100.16215.72
5.6.130.0070.18615.92
5.6.120.0030.17615.61
5.6.110.0100.16915.55
5.6.100.0080.20215.47
5.6.90.0050.17315.67
5.6.80.0030.20115.67
5.6.70.0030.16715.72
5.6.60.0050.17015.76
5.6.50.0050.17715.74
5.6.40.0070.17115.57
5.6.30.0080.16115.52
5.6.20.0070.15915.60
5.6.10.0070.17515.53
5.6.00.0070.17215.40

preferences:
37.97 ms | 404 KiB | 6 Q