3v4l.org

run code in 300+ PHP versions simultaneously
<?php $video_url = 'http://google.com'; $needles = array('http://', 'https://'); // Normalise the URLs foreach ($needles as $needle) { if ( strpos($video_url, $needle) !== 0 ) { $video_url = 'http://' . $video_url; break 2; } } echo $video_url;

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.340.0030.03811.97
5.4.320.0050.04312.46
5.4.310.0040.04712.45
5.4.300.0070.04412.46
5.4.290.0060.04312.45
5.4.280.0100.03712.35
5.4.270.0050.04012.35
5.4.260.0070.03712.35
5.4.250.0100.03812.35
5.4.240.0090.04112.35
5.4.230.0060.03712.34
5.4.220.0040.04012.34
5.4.210.0110.04312.34
5.4.200.0090.03912.34
5.4.190.0050.03712.34
5.4.180.0090.04012.34
5.4.170.0080.03912.35
5.4.160.0100.03312.34
5.4.150.0070.04012.34
5.4.140.0020.04012.03
5.4.130.0060.03512.01
5.4.120.0080.03411.97
5.4.110.0090.03711.96
5.4.100.0130.06011.96
5.4.90.0100.04511.97
5.4.80.0070.04011.96
5.4.70.0070.04111.96
5.4.60.0040.04311.96
5.4.50.0060.04311.96
5.4.40.0070.03711.95
5.4.30.0070.04111.95
5.4.20.0050.03611.95
5.4.10.0090.03311.95
5.4.00.0030.03911.44

preferences:
139.38 ms | 1386 KiB | 7 Q