3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reg_exUrl = "/((http|https)\:\/\/|(www)\.)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; $text = 'some text http://mybreaktrip.cs.bsbm.eu/trip/view_bids/vienna-tripbsbm-ltd'; preg_match_all($reg_exUrl, $text, $matches); $usedPatterns = array(); foreach($matches[0] as $pattern){ if(!array_key_exists($pattern, $usedPatterns)) { $usedPatterns[$pattern] = true; if(!preg_match('%https://%',$pattern) && !preg_match('%http://%',$pattern)) { $start = "http://"; } if(strlen($pattern) > 18) { $parseurl = parse_url($pattern); $pattern_short = $parseurl['host'].substr($parseurl['path'], 0, 5).'...'.substr($parseurl['path'], -7); } $text = str_replace($pattern, "<a href='".(isset($start) ? $start : '')."{$pattern}' target='_blank'>".(isset($pattern_short) ? $pattern_short : $pattern)."</a> ", $text); } } echo $text;

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.01118.56
8.3.50.0110.00522.19
8.3.40.0160.00019.14
8.3.30.0070.00719.22
8.3.20.0040.01120.33
8.3.10.0030.00522.09
8.3.00.0000.00822.27
8.2.180.0110.00716.63
8.2.170.0100.01022.96
8.2.160.0070.00721.09
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.48
8.2.110.0050.00522.37
8.2.100.0120.00317.97
8.2.90.0040.00419.26
8.2.80.0030.00519.73
8.2.70.0000.00917.75
8.2.60.0080.00018.04
8.2.50.0040.00418.07
8.2.40.0040.00418.29
8.2.30.0000.00818.19
8.2.20.0040.00417.82
8.2.10.0030.00619.57
8.2.00.0060.00617.85
8.1.280.0090.00625.92
8.1.270.0040.00422.03
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00923.88
8.1.230.0060.00619.18
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.60
8.1.190.0040.00417.64
8.1.180.0050.00318.10
8.1.170.0030.00618.56
8.1.160.0000.00722.11
8.1.150.0030.00618.79
8.1.140.0000.00717.58
8.1.130.0000.00717.76
8.1.120.0050.00317.62
8.1.110.0050.00317.61
8.1.100.0000.00717.63
8.1.90.0000.00717.59
8.1.80.0040.00417.56
8.1.70.0040.00417.59
8.1.60.0040.00417.73
8.1.50.0080.00017.70
8.1.40.0040.00417.75
8.1.30.0070.00317.78
8.1.20.0040.00417.79
8.1.10.0080.00017.70
8.1.00.0000.00717.53
8.0.300.0070.00018.77
8.0.290.0040.00417.30
8.0.280.0040.00418.37
8.0.270.0000.00717.38
8.0.260.0040.00416.93
8.0.250.0040.00417.18
8.0.240.0030.00317.14
8.0.230.0070.00017.14
8.0.220.0030.00417.09
8.0.210.0040.00417.07
8.0.200.0000.00617.12
8.0.190.0000.00717.16
8.0.180.0080.00017.00
8.0.170.0000.00817.07
8.0.160.0000.00717.05
8.0.150.0000.00817.08
8.0.140.0030.00616.92
8.0.130.0000.00713.54
8.0.120.0000.00817.09
8.0.110.0000.00816.96
8.0.100.0000.00817.12
8.0.90.0050.00217.09
8.0.80.0000.01517.03
8.0.70.0000.00816.97
8.0.60.0000.00716.96
8.0.50.0000.00817.13
8.0.30.0110.01017.23
8.0.20.0110.00817.46
8.0.10.0050.00217.15
8.0.00.0100.01216.93
7.4.330.0000.00715.00
7.4.320.0030.00316.70
7.4.300.0030.00316.88
7.4.290.0030.00616.77
7.4.280.0030.00316.73
7.4.270.0030.00316.89
7.4.260.0000.00716.66
7.4.250.0070.00016.72
7.4.240.0050.00216.83
7.4.230.0000.00716.83
7.4.220.0100.01016.93
7.4.210.0080.00616.76
7.4.200.0040.00416.64
7.4.190.0050.00317.02
7.4.160.0070.01016.50
7.4.150.0080.00917.40
7.4.140.0080.00917.86
7.4.130.0110.00716.92
7.4.120.0090.00816.80
7.4.110.0120.00616.67
7.4.100.0130.00416.86
7.4.90.0080.01116.66
7.4.80.0120.00619.39
7.4.70.0140.00316.71
7.4.60.0070.01016.75
7.4.50.0080.00016.60
7.4.40.0070.01122.77
7.4.30.0060.01016.71
7.4.00.0110.00715.29
7.3.330.0000.00513.34
7.3.320.0000.00613.41
7.3.310.0000.00816.55
7.3.300.0000.00716.48
7.3.290.0040.01116.50
7.3.280.0090.00916.52
7.3.270.0070.01117.40
7.3.260.0060.01016.65
7.3.250.0100.01016.74
7.3.240.0130.00516.43
7.3.230.0030.01716.47
7.3.210.0090.00816.53
7.3.200.0100.00719.39
7.3.190.0100.01216.61
7.3.180.0090.00916.72
7.3.170.0130.01016.50
7.3.160.0110.00516.83
7.3.120.0110.00415.32
7.2.330.0070.01016.63
7.2.320.0130.01016.75
7.2.310.0120.00616.89
7.2.300.0170.00716.84
7.2.290.0130.01016.89
7.2.110.0340.00316.84
7.2.100.0140.00817.00
7.2.90.0130.00916.97
7.2.80.0160.00816.57
7.2.70.0100.01017.19
7.2.60.0240.00617.06
7.2.50.0180.00617.01
7.2.40.0210.00017.01
7.2.30.0060.01017.21
7.2.20.0150.00917.05
7.2.10.0160.00617.28
7.2.00.0090.01518.41
7.1.230.0120.00515.94
7.1.220.0290.00615.84
7.1.210.0150.00616.03
7.1.200.0190.00616.01
7.1.190.0240.00316.05
7.1.180.0080.01215.78
7.1.170.0160.00416.03
7.1.160.0190.00815.77
7.1.150.0150.00315.61
7.1.140.0240.00316.02
7.1.130.0190.00616.08
7.1.120.0130.00615.74
7.1.110.0150.00815.91
7.1.100.0620.00416.27
7.1.90.0200.00616.11
7.1.80.0160.00415.93
7.1.70.0110.00316.58
7.1.60.0140.01217.99
7.1.50.0170.00916.65
7.1.40.0250.00016.45
7.1.30.0160.01315.91
7.1.20.0240.00416.19
7.1.10.0160.00716.04
7.1.00.0120.03819.13
7.0.310.0200.00315.42
7.0.300.0200.00315.62
7.0.290.0180.00015.74
7.0.280.0150.01015.64
7.0.270.0200.00015.62
7.0.260.0170.00315.47
7.0.250.0280.00415.52
7.0.240.0100.01015.64
7.0.230.0150.00715.71
7.0.220.0210.00315.58
7.0.210.0100.00515.52
7.0.200.0070.00316.25
7.0.190.0210.00715.60
7.0.180.0050.01115.68
7.0.170.0190.00315.28
7.0.160.0120.01015.62
7.0.150.0100.01015.53
7.0.140.0120.03818.90
7.0.130.0260.00315.72
7.0.120.0180.00315.72
7.0.110.0200.00015.64
7.0.100.0040.01215.54
7.0.90.0070.00715.62
7.0.80.0140.00415.36
7.0.70.0120.00315.59
7.0.60.0130.03617.97
7.0.50.0080.04016.72
7.0.40.0110.02216.91
7.0.30.0200.04116.79
7.0.20.0200.03716.95
7.0.10.0100.04217.09
7.0.00.0120.02016.96
5.6.380.0110.00414.70
5.6.370.0090.00814.50
5.6.360.0120.00714.70
5.6.350.0190.00314.46
5.6.340.0120.00714.92
5.6.330.0150.00314.19
5.6.320.0100.00714.72
5.6.310.0100.00514.58
5.6.300.0130.00614.42
5.6.290.0120.00314.47
5.6.280.0040.05317.72
5.6.270.0150.00714.52
5.6.260.0160.00814.73
5.6.250.0160.00314.61
5.6.240.0070.00714.42
5.6.230.0050.01414.52
5.6.220.0140.00614.47
5.6.210.0110.04317.58
5.6.200.0110.02316.41
5.6.190.0060.02617.55
5.6.180.1720.02317.61
5.6.170.0200.02217.60
5.6.160.0090.02417.40
5.6.150.0110.02716.37
5.6.140.0090.02416.40
5.6.130.0110.04416.35
5.6.120.0060.02517.63
5.6.110.0080.04217.70
5.6.100.0140.04117.88
5.6.90.0150.04017.74
5.6.80.0170.03317.40
5.6.70.1940.02317.31
5.6.60.0200.00014.28
5.6.50.0090.00914.24
5.6.40.0110.00814.11
5.6.30.0040.00914.31
5.6.20.0050.01414.24
5.6.10.0150.00514.11
5.6.00.0100.00614.50
5.5.380.0050.00812.79
5.5.370.0090.00612.79
5.5.360.0080.00412.79
5.5.350.0080.04216.56
5.5.340.0090.03515.37
5.5.330.0030.03316.49
5.5.320.1600.02316.55
5.5.310.0200.02916.54
5.5.300.0090.04015.40
5.5.290.0050.02415.36
5.5.280.0110.02016.84
5.5.270.0060.04516.79
5.5.260.0130.03816.84
5.5.250.0110.04416.69
5.5.240.0160.04016.49
5.5.230.0060.00612.79
5.5.220.0030.01012.79
5.5.210.0080.00512.79
5.5.200.0120.00012.79
5.5.190.0120.00012.79
5.5.180.0030.01012.79
5.5.170.0140.00914.46
5.5.160.0140.00012.79
5.5.150.0130.00312.79
5.5.140.0070.00212.79
5.5.130.0150.00312.79
5.5.120.0080.00612.79
5.5.110.0050.00512.79
5.5.100.0080.00212.79
5.5.90.0090.00012.79
5.5.80.0080.00412.79
5.5.70.0100.00312.79
5.5.60.0130.00312.79
5.5.50.0090.00312.79
5.5.40.0050.00512.79
5.5.30.0110.01112.79
5.5.20.0000.01312.79
5.5.10.0000.01312.79
5.5.00.0070.00512.79
5.4.450.0130.02816.13
5.4.440.0480.03116.08
5.4.430.0090.03216.14
5.4.420.0470.02715.94
5.4.410.0130.02415.98
5.4.400.0480.02816.02
5.4.390.0060.03815.83
5.4.380.0190.02715.74
5.4.370.0120.03115.63
5.4.360.0120.03115.66
5.4.350.0210.02015.63
5.4.340.0140.02915.75
5.4.330.0080.00512.79
5.4.320.0090.02712.63
5.4.310.0080.02512.63
5.4.300.0070.02512.63
5.4.290.0070.02712.63
5.4.280.0060.02612.57
5.4.270.0070.02012.57
5.4.260.0070.02112.57
5.4.250.0040.02312.56
5.4.240.0060.02112.57
5.4.230.0070.02112.56
5.4.220.0050.02112.56
5.4.210.0090.01912.56
5.4.200.0070.02212.56
5.4.190.0080.02112.56
5.4.180.0030.02212.56
5.4.170.0070.02012.56
5.4.160.0080.01912.56
5.4.150.0070.01912.56
5.4.140.0080.02112.40
5.4.130.0080.02112.40
5.4.120.0070.02212.38
5.4.110.0070.02212.37
5.4.100.0060.01912.38
5.4.90.0080.02012.37
5.4.80.0090.01912.38
5.4.70.0070.01912.37
5.4.60.0080.02112.37
5.4.50.0100.02012.37
5.4.40.0080.01812.37
5.4.30.0040.02212.37
5.4.20.0060.02212.37
5.4.10.0090.01812.37
5.4.00.0060.02112.11
5.3.290.0080.03012.79
5.3.280.0060.02312.75
5.3.270.0090.02212.76
5.3.260.0050.02412.75
5.3.250.0060.02112.75
5.3.240.0100.02012.76
5.3.230.0060.02212.75
5.3.220.0080.02012.73
5.3.210.0080.02312.73
5.3.200.0020.02512.74
5.3.190.0080.01912.73
5.3.180.0080.01912.73
5.3.170.0090.02012.73
5.3.160.0090.02012.73
5.3.150.0060.02512.73
5.3.140.0060.02112.73
5.3.130.0080.02312.72
5.3.120.0070.02812.72
5.3.110.0070.02412.72
5.3.100.0100.02012.45
5.3.90.0070.02412.44
5.3.80.0080.02112.43
5.3.70.0070.02412.43
5.3.60.0100.02012.43
5.3.50.0100.02012.40
5.3.40.0050.02412.40
5.3.30.0090.02012.37
5.3.20.0060.02412.26
5.3.10.0090.02312.24
5.3.00.0020.02412.24
5.2.170.0050.01810.98
5.2.160.0050.01610.99
5.2.150.0030.01910.99
5.2.140.0040.01710.98
5.2.130.0100.01310.96
5.2.120.0040.01810.96
5.2.110.0060.01610.97
5.2.100.0070.01610.97
5.2.90.0040.01810.97
5.2.80.0040.01810.96
5.2.70.0050.01810.96
5.2.60.0050.01810.94
5.2.50.0090.01410.92
5.2.40.0070.01610.92
5.2.30.0060.02310.91
5.2.20.0080.01910.90
5.2.10.0080.02310.86
5.2.00.0050.01910.79
5.1.60.0060.01410.43
5.1.50.0090.01510.43
5.1.40.0070.01210.42
5.1.30.0020.01710.60
5.1.20.0030.01910.61
5.1.10.0050.01610.47
5.1.00.0040.01910.47
5.0.50.0050.0109.71
5.0.40.0070.0129.64
5.0.30.0050.0209.54
5.0.20.0040.0109.53
5.0.10.0030.0179.53
5.0.00.0040.0209.52
4.4.90.0050.0098.79
4.4.80.0030.0108.77
4.4.70.0020.0108.77
4.4.60.0040.0098.77
4.4.50.0050.0098.78
4.4.40.0020.0168.75
4.4.30.0040.0138.77
4.4.20.0030.0138.82
4.4.10.0060.0118.82
4.4.00.0030.0208.77
4.3.110.0030.0128.73
4.3.100.0020.0158.73
4.3.90.0040.0098.71
4.3.80.0050.0128.69
4.3.70.0040.0098.71
4.3.60.0040.0098.71
4.3.50.0020.0138.71
4.3.40.0060.0158.66
4.3.30.0020.0138.05
4.3.20.0020.0118.04
4.3.10.0030.0098.02
4.3.00.0030.0149.96

preferences:
54.27 ms | 401 KiB | 5 Q