3v4l.org

run code in 300+ PHP versions simultaneously
<?php function addSchema($url, $shemaToAdd = 'http') { $allowedShemas = array('http', 'https'); if(!in_array($shemaToAdd, $allowedShemas)) { throw new Exception('Shema is not allowed: ' .$shemaToAdd); } foreach($allowedShemas as $shema) { $shema.= '://'; if(substr($url, 0, strlen($shema)) === $shema) { $url = substr($url, strlen($shema)); break; } } return $shemaToAdd . '://' . $url; } $url = 'http://exkavator.ru/trade/parts/message/7113.html'; echo addSchema($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)
8.3.60.0110.00318.43
8.3.50.0070.01321.21
8.3.40.0060.00918.85
8.3.30.0070.01018.75
8.3.20.0030.00518.78
8.3.10.0060.00321.11
8.3.00.0000.00823.66
8.2.180.0070.01416.63
8.2.170.0140.00722.96
8.2.160.0070.01020.48
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00221.11
8.2.110.0080.00322.28
8.2.100.0080.00417.68
8.2.90.0000.00819.20
8.2.80.0060.00617.97
8.2.70.0040.00417.63
8.2.60.0000.00918.05
8.2.50.0080.00018.10
8.2.40.0000.00818.22
8.2.30.0040.00421.24
8.2.20.0080.00017.65
8.2.10.0040.00417.74
8.2.00.0000.00817.75
8.1.280.0120.00425.92
8.1.270.0030.00523.99
8.1.260.0090.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00423.98
8.1.230.0000.01117.83
8.1.220.0000.00817.78
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0050.00319.01
8.1.150.0000.00718.57
8.1.140.0070.00017.46
8.1.130.0000.00717.88
8.1.120.0030.00517.36
8.1.110.0040.00417.45
8.1.100.0000.00817.37
8.1.90.0050.00517.38
8.1.80.0000.00817.43
8.1.70.0030.00317.40
8.1.60.0080.00017.46
8.1.50.0040.00417.52
8.1.40.0040.00417.56
8.1.30.0040.00417.65
8.1.20.0050.00317.50
8.1.10.0050.00217.43
8.1.00.0000.00817.49
8.0.300.0000.00818.77
8.0.290.0030.00616.75
8.0.280.0040.00418.46
8.0.270.0030.00317.24
8.0.260.0060.00016.83
8.0.250.0040.00417.04
8.0.240.0030.00616.93
8.0.230.0060.00316.99
8.0.220.0070.00016.86
8.0.210.0060.00016.79
8.0.200.0070.00016.88
8.0.190.0000.00717.05
8.0.180.0040.00416.98
8.0.170.0030.00516.92
8.0.160.0070.00016.98
8.0.150.0030.00516.75
8.0.140.0060.00316.73
8.0.130.0000.00513.37
8.0.120.0000.00716.87
8.0.110.0040.00416.77
8.0.100.0040.00416.84
8.0.90.0050.00316.91
8.0.80.0070.01016.84
8.0.70.0070.00016.80
8.0.60.0040.00416.95
8.0.50.0000.00716.96
8.0.30.0070.01117.07
8.0.20.0070.01217.40
8.0.10.0040.00417.06
8.0.00.0140.00916.86
7.4.330.0040.00414.91
7.4.320.0000.00616.52
7.4.300.0030.00316.53
7.4.290.0040.00416.51
7.4.280.0070.00316.49
7.4.270.0030.00316.46
7.4.260.0000.00513.30
7.4.250.0040.00416.58
7.4.240.0000.00716.61
7.4.230.0070.00016.59
7.4.220.0120.01316.50
7.4.210.0110.00516.54
7.4.200.0000.00716.71
7.4.190.0000.00816.48
7.4.160.0090.00616.57
7.4.150.0170.00017.40
7.4.140.0120.01117.86
7.4.130.0140.00316.63
7.4.120.0090.00716.64
7.4.110.0100.00716.54
7.4.100.0120.00616.52
7.4.90.0070.01716.38
7.4.80.0060.01119.39
7.4.70.0110.01116.57
7.4.60.0100.00716.48
7.4.50.0060.00016.30
7.4.40.0030.00922.77
7.4.30.0110.00816.80
7.4.10.0070.01116.73
7.4.00.0060.01215.78
7.3.330.0000.00513.37
7.3.320.0000.00513.37
7.3.310.0000.00716.19
7.3.300.0030.00316.38
7.3.290.0040.01116.34
7.3.280.0080.00916.33
7.3.270.0040.01317.40
7.3.260.0110.01018.24
7.3.250.0260.01616.35
7.3.240.0030.01216.40
7.3.230.0140.00516.48
7.3.210.0100.00616.35
7.3.200.0090.00919.39
7.3.190.0060.01316.61
7.3.180.0000.02016.57
7.3.170.0120.00316.57
7.3.160.0070.01316.54
7.3.130.0040.01316.33
7.3.120.0070.00815.68
7.3.110.0040.01316.28
7.3.100.0080.01216.11
7.3.90.0000.01616.22
7.3.80.0070.00716.59
7.3.70.0100.00316.45
7.3.60.0060.00616.32
7.3.50.0090.00616.20
7.3.40.0000.01316.47
7.3.30.0030.01216.35
7.3.20.0060.00618.21
7.3.10.0040.00818.06
7.3.00.0110.00718.23
7.2.330.0170.00016.67
7.2.320.0180.00316.70
7.2.310.0060.01216.82
7.2.300.0100.00716.65
7.2.290.0130.00316.79
7.2.260.0140.00616.67
7.2.250.0060.01216.49
7.2.240.0100.00316.55
7.2.230.0110.00416.59
7.2.220.0090.00616.59
7.2.210.0030.01316.63
7.2.200.0060.00916.76
7.2.190.0090.00616.62
7.2.180.0050.00516.76
7.2.170.0060.00916.54
7.2.160.0030.01016.57
7.2.150.0070.00718.39
7.2.140.0070.00718.43
7.2.130.0130.00618.31
7.2.120.0100.01018.41
7.2.110.0100.00718.43
7.2.100.0060.01018.38
7.2.90.0030.01218.49
7.2.80.0070.01418.44
7.2.70.0080.00818.27
7.2.60.0100.00718.41
7.2.50.0110.00018.42
7.2.40.0030.01418.52
7.2.30.0040.00718.54
7.2.20.0070.01018.63
7.2.10.0070.00718.38
7.2.00.0040.01119.01
7.1.330.0110.00317.54
7.1.320.0100.00717.35
7.1.310.0070.00317.47
7.1.300.0100.00317.45
7.1.290.0000.01217.42
7.1.280.0120.00317.32
7.1.270.0090.00317.40
7.1.260.0090.00617.15
7.1.250.0030.01017.45
7.1.240.0060.00317.52
7.1.230.0070.00717.38
7.1.220.0080.00517.34
7.1.210.0060.00617.42
7.1.200.0100.01017.54
7.1.190.0000.01617.28
7.1.180.0040.00817.32
7.1.170.0000.01017.30
7.1.160.0000.01417.32
7.1.150.0030.01317.38
7.1.140.0100.00017.45
7.1.130.0030.01217.21
7.1.120.0030.00617.38
7.1.110.0000.01217.35
7.1.100.0050.00917.85
7.1.90.0040.00817.23
7.1.80.0070.01017.49
7.1.70.0080.00217.29
7.1.60.0040.00617.36
7.1.50.0050.01317.12
7.1.40.0060.00317.61
7.1.30.0040.01217.39
7.1.20.0040.01117.29
7.1.10.0060.00917.14
7.1.00.0040.02219.85
7.0.330.0110.00416.86
7.0.320.0080.00416.98
7.0.310.0040.00717.19
7.0.300.0190.00016.98
7.0.290.0030.01017.09
7.0.280.0030.00917.05
7.0.270.0070.00717.11
7.0.260.0090.00316.97
7.0.250.0040.01117.18
7.0.240.0090.00617.17
7.0.230.0000.01417.06
7.0.220.0060.00916.95
7.0.210.0030.00617.05
7.0.200.0070.00316.92
7.0.190.0090.00017.17
7.0.180.0000.01116.96
7.0.170.0000.01617.14
7.0.160.0070.00716.94
7.0.150.0090.00617.12
7.0.140.0050.04019.52
7.0.130.0000.01117.20
7.0.120.0070.00717.03
7.0.110.0000.01116.93
7.0.100.0200.03918.47
7.0.90.0070.04918.49
7.0.80.0120.04418.51
7.0.70.0060.04418.42
7.0.60.0100.03718.38
7.0.50.0070.03018.60
7.0.40.0070.04817.58
7.0.30.0070.02617.52
7.0.20.0050.02517.51
7.0.10.0020.03017.63
7.0.00.0050.02417.41
5.6.400.0030.01315.89
5.6.390.0070.00716.00
5.6.380.0040.01116.02
5.6.370.0050.00816.03
5.6.360.0070.01015.83
5.6.350.0070.00715.88
5.6.340.0130.00316.00
5.6.330.0120.00616.06
5.6.320.0030.01016.07
5.6.310.0030.01015.66
5.6.300.0060.00915.43
5.6.290.0080.00416.02
5.6.280.0030.04018.40
5.6.270.0070.01015.89
5.6.260.0120.00016.19
5.6.250.0120.04118.17
5.6.240.0070.04418.31
5.6.230.0070.02818.13
5.6.220.0100.03718.29
5.6.210.0070.03118.19
5.6.200.0090.03218.33
5.6.190.0050.03418.64
5.6.180.0080.02718.47
5.6.170.0050.03018.45
5.6.160.0170.01818.36
5.6.150.0050.02818.51
5.6.140.0030.02618.41
5.6.130.0050.02718.56
5.6.120.0020.02918.37
5.6.110.0100.02118.52
5.6.100.0060.02518.52
5.6.90.0060.02618.44
5.6.80.0020.03818.10
5.6.70.0000.04618.09
5.6.60.0080.02118.15
5.6.50.0030.02618.08
5.6.40.0060.02518.05
5.6.30.0090.01918.11
5.6.20.0070.02218.18
5.6.10.0100.02218.14
5.6.00.0110.01818.19
5.5.380.0020.04318.19
5.5.370.0050.02618.12
5.5.360.0110.04018.08
5.5.350.0030.04618.06
5.5.340.0060.03118.34
5.5.330.0080.04318.17
5.5.320.0080.04018.23
5.5.310.0050.02518.31
5.5.300.0030.02518.42
5.5.290.0020.03118.36
5.5.280.0030.02518.24
5.5.270.0060.02018.29
5.5.260.0060.02418.40
5.5.250.0070.02318.28
5.5.240.0050.02217.96
5.5.230.0120.01718.01
5.5.220.0030.02718.00
5.5.210.0050.02318.13
5.5.200.0050.02418.06
5.5.190.0090.02018.03
5.5.180.0060.02318.13
5.5.170.0060.00915.89
5.5.160.0030.02218.02
5.5.150.0060.02318.11
5.5.140.0030.02418.07
5.5.130.0100.02218.04
5.5.120.0050.02318.13
5.5.110.0060.02418.03
5.5.100.0080.02117.88
5.5.90.0030.02617.94
5.5.80.0070.02017.87
5.5.70.0090.01617.99
5.5.60.0060.02417.94
5.5.50.0020.02417.90
5.5.40.0050.02017.97
5.5.30.0050.04417.89
5.5.20.0100.04317.96
5.5.10.0020.04617.84
5.5.00.0060.03317.97
5.4.450.0050.02516.11
5.4.440.0030.02316.02
5.4.430.0030.02516.12
5.4.420.0010.02116.08
5.4.410.0030.02416.05
5.4.400.0050.01815.94
5.4.390.0000.02615.91
5.4.380.0030.02115.85
5.4.370.0010.02316.08
5.4.360.0020.02515.88
5.4.350.0030.02315.92
5.4.340.0020.02615.82
5.4.330.0090.00312.58
5.4.320.0030.02315.72
5.4.310.0030.02215.90
5.4.300.0060.01815.74
5.4.290.0020.02615.86
5.4.280.0070.01715.88
5.4.270.0030.02515.71
5.4.260.0080.02315.90
5.4.250.0090.02216.08
5.4.240.0070.02315.84
5.4.230.0010.02615.73
5.4.220.0020.02415.79
5.4.210.0050.02015.88
5.4.200.0070.01715.85
5.4.190.0050.02315.83
5.4.180.0050.03815.77
5.4.170.0040.02915.91
5.4.160.0040.04015.76
5.4.150.0060.04115.86
5.4.140.0040.04114.61
5.4.130.0050.04214.49
5.4.120.0030.04214.67
5.4.110.0070.03214.66
5.4.100.0070.03714.59
5.4.90.0060.02314.55
5.4.80.0030.03914.48
5.4.70.0060.02814.62
5.4.60.0130.03314.48
5.4.50.0090.02314.53
5.4.40.0070.02714.58
5.4.30.0050.04514.58
5.4.20.0050.03914.61
5.4.10.0090.03314.42
5.4.00.0050.03814.17
5.3.290.0070.02214.08
5.3.280.0030.02013.93
5.3.270.0070.04713.84
5.3.260.0080.04013.97
5.3.250.0070.03813.76
5.3.240.0030.03013.77
5.3.230.0070.03613.89
5.3.220.0050.02713.85
5.3.210.0050.03513.75
5.3.200.0030.04113.83
5.3.190.0070.02313.75
5.3.180.0050.04413.82
5.3.170.0070.04013.94
5.3.160.0070.02513.81
5.3.150.0080.04013.80
5.3.140.0030.04613.75
5.3.130.0050.02813.84
5.3.120.0020.02813.88
5.3.110.0070.04213.78
5.3.100.0070.02913.54
5.3.90.0050.03413.57
5.3.80.0080.03713.61
5.3.70.0030.03513.46
5.3.60.0020.04613.53
5.3.50.0020.03213.63
5.3.40.0030.04413.50
5.3.30.0020.02413.49
5.3.20.0020.03013.29
5.3.10.0050.03513.22
5.3.00.0050.03513.28
5.2.170.0030.03711.00
5.2.160.0030.03011.25
5.2.150.0070.05711.15
5.2.140.0000.07011.19
5.2.130.0030.04011.15
5.2.120.0070.05711.00
5.2.110.0000.06711.10
5.2.100.0070.03310.95
5.2.90.0070.05711.22
5.2.80.0000.03311.00
5.2.70.0000.05311.21
5.2.60.0100.05011.16
5.2.50.0100.05011.07
5.2.40.0030.03010.90
5.2.30.0070.04311.03
5.2.20.0100.05310.87
5.2.10.0070.05710.85
5.2.00.0030.05310.64
5.1.60.0070.05010.11
5.1.50.0070.0509.98
5.1.40.0070.0479.99
5.1.30.0030.06010.25
5.1.20.0030.04310.38
5.1.10.0030.04710.12
5.1.00.0000.03310.06
5.0.50.0000.0438.55
5.0.40.0000.0438.40
5.0.30.0000.0608.40
5.0.20.0000.0238.40
5.0.10.0100.0408.40
5.0.00.0070.0638.40
4.4.90.0030.0178.40
4.4.80.0100.0238.40
4.4.70.0100.0238.40
4.4.60.0000.0378.40
4.4.50.0000.0338.40
4.4.40.0030.0378.40
4.4.30.0030.0278.40
4.4.20.0070.0238.40
4.4.10.0070.0178.40
4.4.00.0030.0538.40
4.3.110.0030.0308.40
4.3.100.0030.0338.40
4.3.90.0070.0308.40
4.3.80.0070.0478.40
4.3.70.0030.0338.40
4.3.60.0030.0338.40
4.3.50.0030.0308.40
4.3.40.0030.0408.40
4.3.30.0030.0338.40
4.3.20.0100.0208.40
4.3.10.0000.0408.40
4.3.00.0070.0238.40

preferences:
42.6 ms | 401 KiB | 5 Q