3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeRandomPath($dir, $ext) { do { $path = $dir."/".genRandomString().".".$ext; } while(file_exists($path)); return $path; } echo makeRandomPath(); function makeRandomPathFromFilename($dir, $fn) { $ext = pathinfo($fn, PATHINFO_EXTENSION); return makeRandomPath($dir, $ext); } echo makeRandomPathFromFilename();

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.40.0120.00318.89
8.3.30.0110.00718.88
8.3.20.0060.00319.35
8.3.10.0000.00823.51
8.3.00.0080.00022.40
8.2.170.0000.01422.96
8.2.160.0070.00722.26
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0070.00319.70
8.2.120.0040.00426.35
8.2.110.0100.00020.57
8.2.100.0120.00017.72
8.2.90.0000.00817.63
8.2.80.0050.00317.97
8.2.70.0000.00817.80
8.2.60.0040.00417.97
8.2.50.0000.00818.10
8.2.40.0050.00219.30
8.2.30.0050.00519.22
8.2.20.0000.00717.99
8.2.10.0000.00817.98
8.2.00.0080.00017.53
8.1.270.0050.00318.90
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.79
8.1.230.0080.00417.42
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0050.00517.23
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0030.00518.55
8.1.160.0040.00418.76
8.1.150.0000.00718.63
8.1.140.0030.00322.13
8.1.130.0050.00220.26
8.1.120.0030.00317.33
8.1.110.0040.00417.21
8.1.100.0030.00317.33
8.1.90.0050.00317.30
8.1.80.0060.00317.33
8.1.70.0040.00417.25
8.1.60.0060.00317.40
8.1.50.0000.00817.28
8.1.40.0000.00917.45
8.1.30.0040.00417.41
8.1.20.0000.00717.54
8.1.10.0000.00817.53
8.1.00.0040.00417.33
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0000.00718.29
8.0.270.0000.00717.17
8.0.260.0000.00618.39
8.0.250.0070.00016.96
8.0.240.0030.00316.95
8.0.230.0040.00416.96
8.0.220.0000.00716.90
8.0.210.0030.00316.88
8.0.200.0060.00016.96
8.0.190.0030.00516.84
8.0.180.0000.00816.91
8.0.170.0000.00816.91
8.0.160.0030.00416.91
8.0.150.0040.00416.92
8.0.140.0030.00316.84
8.0.130.0000.00613.27
8.0.120.0020.00516.90
8.0.110.0040.00416.76
8.0.100.0000.00716.90
8.0.90.0030.00316.92
8.0.80.0040.01116.80
8.0.70.0070.00016.85
8.0.60.0030.00516.84
8.0.50.0050.00316.75
8.0.30.0120.00916.84
8.0.20.0110.00817.40
8.0.10.0030.00516.88
8.0.00.0120.00516.82
7.4.330.0000.00515.55
7.4.320.0050.00316.38
7.4.300.0030.00316.43
7.4.290.0000.00716.33
7.4.280.0070.00016.52
7.4.270.0040.00716.45
7.4.260.0030.00316.56
7.4.250.0070.00016.43
7.4.240.0030.00416.45
7.4.230.0030.00316.28
7.4.220.0000.00716.46
7.4.210.0060.01016.44
7.4.200.0000.00716.53
7.4.160.0110.00516.43
7.4.140.0130.00617.86
7.4.130.0150.00316.60
7.4.120.0120.00716.48
7.4.110.0070.01116.48
7.4.100.0060.01016.58
7.4.90.0100.00716.40
7.4.80.0100.00719.39
7.4.70.0110.00616.36
7.4.60.0080.00816.37
7.4.50.0120.00616.50
7.4.40.0100.00716.48
7.4.00.0040.01214.54
7.3.330.0000.00613.17
7.3.320.0050.00013.09
7.3.310.0000.00816.34
7.3.300.0030.00316.27
7.3.290.0070.00016.36
7.3.280.0130.00716.27
7.3.260.0090.01116.45
7.3.240.0100.00816.43
7.3.230.0030.01516.52
7.3.210.0060.01216.25
7.3.200.0110.00516.60
7.3.190.0040.01416.22
7.3.180.0090.00616.47
7.3.170.0100.00716.32
7.3.160.0040.01116.44
7.2.330.0070.01716.59
7.2.320.0090.00916.25
7.2.310.0040.01216.43
7.2.300.0130.00316.64
7.2.290.0120.00616.34
7.2.110.0390.01014.21
7.2.100.0500.00314.25
7.2.90.0360.00914.39
7.2.80.0410.00314.34
7.2.70.0400.00715.00
7.2.60.0530.00414.56
7.2.50.0690.00314.71
7.2.40.0350.01614.84
7.2.30.0540.00314.76
7.2.20.0500.00614.51
7.2.10.0470.01014.55
7.2.00.0450.00714.66
7.1.230.0490.00713.49
7.1.220.0450.00613.64
7.1.210.0400.00713.41
7.1.200.0410.00713.46
7.1.190.0430.00613.61
7.1.180.0510.00313.63
7.1.170.0430.00913.63
7.1.160.0410.00913.34
7.1.150.0530.00313.39
7.1.140.0400.01213.57
7.1.130.0440.00613.68
7.1.120.0940.00313.68
7.1.110.0490.00413.83
7.1.100.0640.00713.43
7.1.90.0520.00813.49
7.1.80.0490.01213.73
7.1.70.0520.00313.75
7.1.60.0570.00631.87
7.1.50.0610.01031.62
7.1.40.0670.01331.68
7.1.30.0610.01931.71
7.1.20.1300.00731.52
7.1.10.0560.00413.42
7.1.00.0510.00313.38
5.6.380.0120.00813.71

preferences:
52.33 ms | 400 KiB | 5 Q