3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = 'ыыыыыыыы'; if (function_exists('transliterator_transliterate') && function_exists('iconv')) { echo 'ICONV Available' .PHP_EOL; } // Remove any trailing dots, as those aren't ever valid file names. $file = rtrim($file, '.'); // Try transliterating the file name using the native php function if (function_exists('transliterator_transliterate') && function_exists('iconv')) { // Using iconv to ignore characters that can't be transliterated $file = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", transliterator_transliterate('Any-Latin; Latin-ASCII; Lower()', $file)); } $regex = array('#(\.){2,}#', '#[^A-Za-z0-9\.\_\- ]#', '#^\.#'); $name = trim(preg_replace($regex, '', $file)); var_dump($name);

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.140.0140.05521.03
8.4.130.0120.04222.34
8.4.120.0100.03627.86
8.4.110.0100.04521.60
8.4.100.0060.02321.57
8.4.90.0130.04021.93
8.4.80.0150.03121.42
8.4.70.0140.04021.64
8.4.60.0050.02322.32
8.4.50.0160.03621.34
8.4.40.0110.01823.18
8.4.30.0100.04824.02
8.4.20.0100.04222.52
8.4.10.0070.02121.25
8.3.270.0170.05120.18
8.3.260.0050.02120.38
8.3.250.0180.03922.45
8.3.240.0120.02220.77
8.3.230.0340.04320.04
8.3.220.0120.03520.57
8.3.210.0130.03020.55
8.3.200.0130.03820.32
8.3.190.0120.03620.57
8.3.180.0130.04022.18
8.3.170.0230.05321.56
8.3.160.0100.03920.27
8.3.150.0070.04522.46
8.3.140.0100.01920.07
8.3.130.0030.02622.24
8.3.120.0070.02024.30
8.3.110.0030.04222.07
8.3.100.0040.02524.06
8.3.90.0070.03326.77
8.3.80.0040.02922.19
8.3.70.0200.04422.19
8.3.60.0200.03120.15
8.3.50.0100.05421.74
8.3.40.0240.03422.37
8.3.30.0030.02822.46
8.3.20.0100.00725.54
8.3.10.0060.01227.15
8.3.00.0060.01026.16
8.2.290.0110.03923.90
8.2.280.0160.03322.14
8.2.270.0170.03120.75
8.2.260.0060.02224.45
8.2.250.0130.05619.88
8.2.240.0040.02622.36
8.2.230.0130.03622.58
8.2.220.0030.03137.54
8.2.210.0000.02626.77
8.2.200.0070.03020.31
8.2.190.0140.05122.35
8.2.180.0170.04825.92
8.2.170.0100.03022.59
8.2.160.0100.02223.82
8.2.150.0090.00925.66
8.2.140.0110.00724.66
8.2.130.0030.01326.16
8.2.120.0000.01723.41
8.2.110.0060.01325.87
8.2.100.0070.01721.66
8.2.90.0070.01421.50
8.2.80.0030.01722.40
8.2.70.0000.02021.75
8.2.60.0030.01721.66
8.2.50.0060.01521.35
8.2.40.0000.02023.76
8.2.30.0030.01721.98
8.2.20.0030.01721.93
8.2.10.0100.01022.94
8.2.00.0030.01722.99
8.1.330.0140.03625.57
8.1.320.0130.03521.83
8.1.310.0040.04620.13
8.1.300.0100.03319.70
8.1.290.0100.02630.84
8.1.280.0130.05825.92
8.1.270.0070.01025.81
8.1.260.0070.01026.35
8.1.250.0100.00728.09
8.1.240.0040.01624.02
8.1.230.0130.01721.39
8.1.220.0000.02121.53
8.1.210.0000.02021.11
8.1.200.0120.01521.25
8.1.190.0030.01621.23
8.1.180.0030.01721.30
8.1.170.0000.02122.45
8.1.160.0040.01822.52
8.1.150.0060.01522.50
8.1.140.0030.01622.50
8.1.130.0040.02123.63
8.1.120.0070.01421.45
8.1.110.0030.01721.46
8.1.100.0000.01921.48
8.1.90.0030.01721.43
8.1.80.0000.02021.51
8.1.70.0060.01321.37
8.1.60.0000.02121.61
8.1.50.0090.01221.47
8.1.40.0060.01521.42
8.1.30.0030.01921.78
8.1.20.0060.01521.71
8.1.10.0070.01421.65
8.1.00.0070.01321.45
8.0.300.0030.01620.95
8.0.290.0030.01620.63
8.0.280.0000.01922.09
8.0.270.0030.01621.76
8.0.260.0060.01221.98
8.0.250.0070.01320.91
8.0.240.0070.01320.77
8.0.230.0000.02020.90
8.0.220.0030.01720.84
8.0.210.0000.01920.73
8.0.200.0080.01120.80
8.0.190.0000.02120.79
8.0.180.0070.01320.88
8.0.170.0090.01220.77
8.0.160.0030.01720.88
8.0.150.0030.01720.77
8.0.140.0070.02020.86
8.0.130.0000.00513.49
8.0.120.0100.01321.13
8.0.110.0060.01621.05
8.0.100.0030.02021.20
8.0.90.0000.02121.07
8.0.80.0090.03221.06
8.0.70.0070.01520.93
8.0.60.0000.02121.00
8.0.50.0030.01820.96
8.0.30.0220.04121.00
8.0.20.0310.05621.04
8.0.10.0330.04421.22
8.0.00.0210.04821.14
7.4.330.0050.00215.55
7.4.320.0000.01920.52
7.4.300.0060.01220.59
7.4.290.0030.01620.55
7.4.280.0060.02220.54
7.4.270.0030.01720.63
7.4.260.0030.00313.42
7.4.250.0030.01820.73
7.4.240.0030.01720.78
7.4.230.0090.01220.86
7.4.220.0020.01920.57
7.4.210.0270.02820.69
7.4.200.0070.01420.66
7.4.160.0220.04820.83
7.4.150.0270.05020.78
7.4.140.0250.03520.65
7.4.130.0210.02820.74
7.4.120.0200.04620.45
7.4.110.0180.03420.64
7.4.100.0210.03220.59
7.4.90.0170.05620.69
7.4.80.0310.04120.48
7.4.70.0210.05420.64
7.4.60.0210.03120.67
7.4.50.0410.03220.66
7.4.40.0260.04020.43
7.4.30.0140.04320.63
7.4.20.0320.04120.54
7.4.10.0210.03820.58
7.4.00.0200.03420.45
7.3.330.0000.02320.21
7.3.320.0000.00713.11
7.3.310.0060.01420.40
7.3.300.0100.01720.32
7.3.290.0100.03720.33
7.3.280.0160.02920.36
7.3.270.0170.03420.38
7.3.260.0270.03720.37
7.3.250.0220.03220.42
7.3.240.0180.03720.39
7.3.230.0210.03120.32
7.3.220.0280.05120.23
7.3.210.0180.04020.18
7.3.200.0200.05320.23
7.3.190.0280.04720.26
7.3.180.0270.04120.24
7.3.170.0160.03720.27
7.3.160.0270.03320.29
7.3.150.0350.03820.18
7.3.140.0140.05820.31
7.3.130.0250.02920.23
7.3.120.0200.03020.29
7.3.110.0240.04820.13
7.3.100.0230.04720.24
7.3.90.0210.04820.59
7.3.80.0200.05120.30
7.3.70.0290.03120.40
7.3.60.0210.04620.50
7.3.50.0380.03120.41
7.3.40.0230.03420.45
7.3.30.0180.04220.54
7.3.20.0270.03920.46
7.3.10.0250.03020.31
7.3.00.0860.03220.29

preferences:
32.11 ms | 403 KiB | 5 Q