3v4l.org

run code in 300+ PHP versions simultaneously
<?php function file_uri_scheme($uri) { $position = strpos($uri, '://'); return $position ? substr($uri, 0, $position) : FALSE; } function file_uri_target($uri) { $data = explode('://', $uri, 2); // Remove erroneous leading or trailing, forward-slashes and backslashes. return count($data) == 2 ? trim($data[1], '\/') : FALSE; } fun ction file_stream_wrapper_uri_normalize($uri) { $scheme = file_uri_scheme($uri); if ($scheme) { $target = file_uri_target($uri); if ($target !== FALSE) { $uri = $scheme . '://' . $target; } } return $uri; } $uri = 'test/example.exe'; echo file_stream_wrapper_uri_normalize($uri);

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)
5.4.320.0200.05019.13
5.4.310.0270.06719.23
5.4.300.0230.04719.23
5.4.290.0200.04019.23
5.4.280.0270.06719.08
5.4.270.0230.05319.08
5.4.260.0300.06319.30
5.4.250.0200.04319.09
5.4.240.0200.04019.08
5.4.230.0200.04019.18
5.4.220.0270.06719.21
5.4.210.0170.05019.13
5.4.200.0270.03719.08
5.4.190.0300.02719.23
5.4.180.0300.06019.29
5.4.170.0170.04019.21
5.4.160.0270.06718.93
5.4.150.0170.03718.82
5.4.140.0170.07716.55
5.4.130.0230.06316.38
5.4.120.0130.04716.39
5.4.110.0200.04316.57
5.4.100.0130.03716.60
5.4.90.0200.03316.42
5.4.80.0170.04016.62
5.4.70.0100.04016.49
5.4.60.0200.07316.26
5.4.50.0200.03016.35
5.4.40.0170.03316.16
5.4.30.0130.03716.32
5.4.20.0200.04016.51
5.4.10.0100.04316.22
5.4.00.0100.03715.96
5.3.290.0000.04014.69
5.3.280.0000.05714.82
5.3.270.1700.04314.54
5.3.260.1600.04314.72
5.3.250.1630.04014.83
5.3.240.1670.03714.62
5.3.230.1430.03714.59
5.3.220.1600.03714.56
5.3.210.1730.03714.56
5.3.200.1670.03714.55
5.3.190.1670.03314.48
5.3.180.1630.03314.57
5.3.170.1800.03714.49
5.3.160.1730.03714.56
5.3.150.1730.03714.54
5.3.140.1700.03314.48
5.3.130.1830.02714.52
5.3.120.1970.04714.52
5.3.110.1830.04014.56
5.3.100.1730.03714.18
5.3.90.1830.04314.01
5.3.80.1730.02314.02
5.3.70.1800.03714.24
5.3.60.1570.03714.09
5.3.50.1530.04313.87
5.3.40.1870.04013.99
5.3.30.1700.04013.96
5.3.20.1700.03713.63
5.3.10.1830.04013.80
5.3.00.1770.04013.55
5.2.170.1570.03311.21
5.2.160.1500.03711.06
5.2.150.1470.02711.08
5.2.140.1370.03011.07
5.2.130.1330.02711.02
5.2.120.1570.03011.27
5.2.110.1230.03711.33
5.2.100.1330.02711.01
5.2.90.1500.04011.04
5.2.80.1300.03311.21
5.2.70.0030.03011.15
5.2.60.0030.05711.01
5.2.50.0170.06310.93
5.2.40.1200.03010.92
5.2.30.1270.04010.98
5.2.20.1170.04310.96
5.2.10.1230.03710.78
5.2.00.1070.02710.80
5.1.60.1300.02710.08
5.1.50.1170.0239.89
5.1.40.1070.0239.96
5.1.30.1230.03710.26
5.1.20.1100.03010.36
5.1.10.1170.0339.98
5.1.00.1130.02310.00
5.0.50.0570.0178.68
5.0.40.0700.0308.50
5.0.30.0730.0438.12
5.0.20.0670.0178.26
5.0.10.0630.0208.25
5.0.00.0670.0308.29
4.4.90.0600.0208.11
4.4.80.0670.0208.11
4.4.70.0600.0278.11
4.4.60.0630.0178.11
4.4.50.0630.0278.11
4.4.40.0730.0378.11
4.4.30.0670.0278.11
4.4.20.0770.0238.11
4.4.10.0700.0178.11
4.4.00.0800.0408.11
4.3.110.0730.0138.11
4.3.100.0600.0138.11
4.3.90.0670.0238.11
4.3.80.0530.0238.11
4.3.70.0770.0278.11
4.3.60.0500.0208.11
4.3.50.0670.0178.11
4.3.40.0470.0208.11
4.3.30.0370.0278.11
4.3.20.0300.0208.11
4.3.10.0300.0208.11
4.3.00.0230.0178.11

preferences:
140.39 ms | 1394 KiB | 7 Q