3v4l.org

run code in 300+ PHP versions simultaneously
<?php function asterisk($password) { $count = min(strlen($password), 4); $passwordAsterisk = str_repeat('*', $count) . substr($password, $count); echo $password . ' => ' . $passwordAsterisk . PHP_EOL; return $passwordAsterisk; } asterisk('abcdef'); asterisk('abc'); asterisk('');

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.0070.01418.30
8.3.60.0060.01016.50
8.3.50.0150.01116.47
8.3.40.0000.01518.53
8.3.30.0140.00018.54
8.3.20.0080.00018.65
8.3.10.0040.00419.34
8.3.00.0000.00823.52
8.2.180.0100.00716.50
8.2.170.0090.00918.97
8.2.160.0040.01122.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.43
8.2.110.0060.00321.22
8.2.100.0000.01117.91
8.2.90.0050.00318.03
8.2.80.0040.00417.97
8.2.70.0050.00317.80
8.2.60.0050.00318.03
8.2.50.0000.00818.10
8.2.40.0000.00819.48
8.2.30.0070.00019.48
8.2.20.0040.00418.08
8.2.10.0070.00018.14
8.2.00.0000.00819.37
8.1.280.0120.00925.92
8.1.270.0040.00422.03
8.1.260.0140.00726.35
8.1.250.0060.00328.09
8.1.240.0090.00020.89
8.1.230.0110.00422.16
8.1.220.0060.00317.74
8.1.210.0030.00618.88
8.1.200.0060.00317.23
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0030.00518.53
8.1.160.0080.00018.86
8.1.150.0040.00418.91
8.1.140.0050.00217.56
8.1.130.0030.00318.89
8.1.120.0040.00317.54
8.1.110.0040.00417.36
8.1.100.0040.00417.37
8.1.90.0000.00717.48
8.1.80.0020.00517.47
8.1.70.0040.00417.38
8.1.60.0050.00317.62
8.1.50.0030.00517.55
8.1.40.0050.00217.59
8.1.30.0000.00817.66
8.1.20.0030.00617.68
8.1.10.0080.00017.53
8.1.00.0040.00417.42
8.0.300.0050.00319.88
8.0.290.0030.00616.75
8.0.280.0030.00318.39
8.0.270.0000.00717.20
8.0.260.0000.00719.10
8.0.250.0000.00717.02
8.0.240.0060.00316.98
8.0.230.0000.00616.88
8.0.220.0000.00716.93
8.0.210.0030.00316.86
8.0.200.0070.00016.85
8.0.190.0050.00316.95
8.0.180.0080.00016.75
8.0.170.0030.00516.93
8.0.160.0040.00416.74
8.0.150.0040.00416.83
8.0.140.0030.00516.72
8.0.130.0060.00013.34
8.0.120.0000.00816.86
8.0.110.0070.00016.86
8.0.100.0000.00716.92
8.0.90.0050.00216.89
8.0.80.0070.01016.88
8.0.70.0040.00416.76
8.0.60.0000.00716.96
8.0.50.0040.00416.77
8.0.30.0120.00616.95
8.0.20.0090.01617.40
8.0.10.0030.00516.82
8.0.00.0070.01016.66
7.4.330.0030.00315.55
7.4.320.0000.00816.57
7.4.300.0030.00316.51
7.4.290.0070.00016.46
7.4.280.0040.00416.61
7.4.270.0000.00716.37
7.4.260.0000.00716.57
7.4.250.0070.00016.51
7.4.240.0000.00716.53
7.4.230.0000.00716.27
7.4.220.0030.00616.70
7.4.210.0060.00816.70
7.4.200.0070.00016.71
7.4.160.0080.01016.57
7.4.140.0120.01017.86
7.4.130.0030.01316.73
7.4.120.0120.00816.52
7.4.110.0030.01316.55
7.4.100.0120.00516.60
7.4.90.0150.00316.68
7.4.80.0120.00919.39
7.4.70.0070.01016.46
7.4.60.0150.00016.46
7.4.50.0070.01116.21
7.4.40.0130.01016.66
7.4.00.0060.01014.86
7.3.330.0030.00313.31
7.3.320.0000.00613.36
7.3.310.0030.00316.46
7.3.300.0030.00316.23
7.3.290.0030.00316.23
7.3.280.0080.00816.35
7.3.260.0110.00916.50
7.3.240.0100.00716.60
7.3.230.0140.00516.45
7.3.210.0100.00716.57
7.3.200.0150.00616.54
7.3.190.0040.01516.37
7.3.180.0040.01216.51
7.3.170.0090.00916.64
7.3.160.0090.01216.46
7.2.330.0080.00816.73
7.2.320.0150.00916.70
7.2.310.0110.00516.53
7.2.300.0140.00316.73
7.2.290.0070.01016.50
7.2.60.0140.00914.84
7.2.50.0490.00914.91
7.2.40.0100.01115.36
7.2.30.0280.01015.40
7.2.20.0650.01115.37
7.2.10.0430.01415.13
7.2.00.3480.00915.42
7.1.200.0090.00015.93
7.1.170.1720.01113.55
7.1.160.2610.01516.70
7.1.150.0270.01316.98
7.1.140.0220.01516.65
7.1.130.0440.01316.66
7.1.120.0440.01216.88
7.1.110.0240.01116.29
7.1.100.0390.01016.16
7.1.90.2740.00715.80
7.1.80.3890.01516.22
7.1.70.2780.00915.38
7.1.60.3410.01433.15
7.1.50.0980.01632.86
7.1.40.0590.02232.40
7.1.30.3150.01632.52
7.1.20.3280.01832.58
7.1.10.3440.01314.77
7.1.00.1470.01314.70

preferences:
54.3 ms | 400 KiB | 5 Q