3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'http://www.twitter.com/monica'; $text = preg_replace_callback( '~ (?<=^|\s) # positive looke behind, check for start of string or whitespace https?:// # match this caracters with an optional s (\S+) # capure group, all non whitespace chars ~ix', function ( $matches ) { return '<a href="' . esc_url( $matches[0] ) . '">' . $matches[1] . '</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.0100.01016.73
8.3.50.0120.00316.63
8.3.40.0110.00418.95
8.3.30.0110.00418.98
8.3.20.0080.00020.39
8.3.10.0040.00421.91
8.3.00.0040.00423.66
8.2.180.0110.00718.36
8.2.170.0070.01322.96
8.2.160.0090.01219.47
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00320.98
8.2.120.0040.00426.35
8.2.110.0040.00719.46
8.2.100.0040.00717.93
8.2.90.0030.00619.08
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0040.00418.09
8.2.40.0030.00622.20
8.2.30.0070.00019.38
8.2.20.0090.00017.78
8.2.10.0050.00518.18
8.2.00.0000.00718.21
8.1.280.0110.00425.92
8.1.270.0100.00622.05
8.1.260.0000.00728.09
8.1.250.0080.00028.09
8.1.240.0030.00622.45
8.1.230.0090.00319.22
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0050.00318.71
8.1.160.0070.00020.80
8.1.150.0000.00720.76
8.1.140.0040.00419.63
8.1.130.0070.00017.79
8.1.120.0040.00417.69
8.1.110.0070.00017.58
8.1.100.0040.00417.66
8.1.90.0030.00517.51
8.1.80.0040.00417.52
8.1.70.0040.00417.66
8.1.60.0000.00917.63
8.1.50.0030.00617.58
8.1.40.0110.00017.56
8.1.30.0000.00817.73
8.1.20.0040.00417.75
8.1.10.0040.00417.70
8.1.00.0040.00417.60
8.0.300.0060.00318.77
8.0.290.0060.00316.75
8.0.280.0030.00318.46
8.0.270.0040.00417.13
8.0.260.0060.00017.26
8.0.250.0070.00017.02
8.0.240.0060.00317.09
8.0.230.0000.00717.09
8.0.220.0050.00316.91
8.0.210.0040.00417.02
8.0.200.0030.00317.06
8.0.190.0050.00317.18
8.0.180.0040.00417.16
8.0.170.0040.00417.18
8.0.160.0040.00417.16
8.0.150.0030.00317.10
8.0.140.0050.00516.94
8.0.130.0000.00513.62
8.0.120.0080.00016.97
8.0.110.0000.00717.11
8.0.100.0020.00517.12
8.0.90.0050.00217.09
8.0.80.0030.01117.10
8.0.70.0000.00817.13
8.0.60.0040.00417.17
8.0.50.0000.00717.00
8.0.30.0100.00817.38
8.0.20.0070.01217.40
8.0.10.0070.00017.27
8.0.00.0090.00917.10
7.4.330.0050.00016.79
7.4.320.0030.00316.86
7.4.300.0080.00016.81
7.4.290.0030.00516.61
7.4.280.0040.00416.73
7.4.270.0000.00716.80
7.4.260.0000.00716.72
7.4.250.0040.00416.69
7.4.240.0020.00516.78
7.4.230.0000.00716.80
7.4.220.0070.01116.84
7.4.210.0080.01016.83
7.4.200.0030.00516.72
7.4.160.0080.00816.66
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0180.00016.56
7.4.120.0080.00916.65
7.4.110.0110.00816.72
7.4.100.0180.00016.63
7.4.90.0100.00716.64
7.4.80.0060.01219.39
7.4.70.0110.00617.03
7.4.60.0090.00616.61
7.4.50.0030.01516.59
7.4.40.0040.01816.47
7.4.30.0000.01816.57
7.4.10.0100.00715.16
7.4.00.0050.01115.00
7.3.330.0050.00013.27
7.3.320.0000.00513.52
7.3.310.0030.00316.48
7.3.300.0030.00316.31
7.3.290.0070.00016.46
7.3.280.0060.01316.44
7.3.270.0100.00717.40
7.3.260.0100.00716.50
7.3.240.0050.01216.73
7.3.230.0140.00416.62
7.3.210.0030.01316.56
7.3.200.0100.00619.39
7.3.190.0090.00916.71
7.3.180.0120.00616.76
7.3.170.0060.01216.49
7.3.160.0060.00916.60
7.3.130.0110.00614.75
7.3.120.0090.00814.96
7.3.110.0040.01115.03
7.3.100.0070.00715.11
7.3.90.0080.00814.91
7.3.80.0050.00714.87
7.3.70.0040.01115.03
7.3.60.0050.00814.91
7.3.50.0040.00914.91
7.3.40.0070.00815.04
7.3.30.0070.00414.96
7.3.20.0040.01116.83
7.3.10.0050.00816.69
7.3.00.0060.00816.61
7.2.330.0150.00416.75
7.2.320.0150.00916.73
7.2.310.0080.00816.72
7.2.300.0060.01016.59
7.2.290.0060.01316.75
7.2.260.0100.00715.17
7.2.250.0090.01015.01
7.2.240.0070.01115.19
7.2.230.0060.00715.19
7.2.220.0050.01015.06
7.2.210.0090.00415.00
7.2.200.0090.00415.12
7.2.190.0100.00515.18
7.2.180.0090.00815.21
7.2.170.0060.00915.09
7.2.160.0040.00814.88
7.2.150.0010.01216.90
7.2.140.0080.00817.12
7.2.130.0020.01117.04
7.2.120.0100.00416.91
7.2.110.0060.00817.05
7.2.100.0060.00917.03
7.2.90.0050.01017.07
7.2.80.0110.00317.07
7.2.70.0050.00816.92
7.2.60.0060.00916.79
7.2.50.0060.00616.86
7.2.40.0090.00717.06
7.2.30.0080.00516.94
7.2.20.0030.00917.03
7.2.10.0060.01017.11
7.2.00.0070.00717.86
7.1.330.0060.00915.83
7.1.320.0040.00815.87
7.1.310.0040.00715.99
7.1.300.0070.00715.90
7.1.290.0110.00515.90
7.1.280.0060.00715.80
7.1.270.0040.00715.87
7.1.260.0050.00915.87
7.1.250.0080.00515.84
7.1.240.0030.01115.77
7.1.230.0060.00615.97
7.1.220.0070.00716.01
7.1.210.0070.00715.93
7.1.200.0060.00615.89
7.1.190.0080.00415.82
7.1.180.0030.01015.90
7.1.170.0050.00615.81
7.1.160.0050.00815.94
7.1.150.0030.00715.91
7.1.140.0100.00615.93
7.1.130.0020.00915.87
7.1.120.0050.00715.75
7.1.110.0050.00915.88
7.1.100.0050.00716.65
7.1.90.0050.00315.81
7.1.80.0060.00415.81
7.1.70.0030.00916.45
7.1.60.0060.01017.12
7.1.50.0050.00816.38
7.1.40.0020.01215.95
7.1.30.0060.00515.90
7.1.20.0030.00715.86
7.1.10.0080.00615.75
7.1.00.0050.02918.11
7.0.330.0070.00515.52
7.0.320.0090.00315.47
7.0.310.0050.00515.39
7.0.300.0000.01415.59
7.0.290.0070.00615.51
7.0.280.0080.00515.64
7.0.270.0080.00515.54
7.0.260.0040.00615.53
7.0.250.0050.00715.38
7.0.240.0040.00915.56
7.0.230.0000.01215.69
7.0.220.0110.00315.51
7.0.210.0070.00515.60
7.0.200.0020.00715.97
7.0.190.0030.01015.35
7.0.180.0070.00715.59
7.0.170.0020.01015.42
7.0.160.0030.00715.43
7.0.150.0060.01015.63
7.0.140.0080.00715.69
7.0.130.0070.00615.56
7.0.120.0040.00615.75
7.0.110.0040.00915.40
7.0.100.0020.00715.61
7.0.90.0060.00515.58
7.0.80.0060.00915.59
7.0.70.0030.01115.62
7.0.60.0020.03617.48
7.0.50.0070.02816.39
7.0.40.0080.03115.85
7.0.30.0170.02815.83
7.0.20.0150.01815.85
7.0.10.0040.02715.78
7.0.00.0090.02115.77
5.6.400.0100.00514.62
5.6.390.0040.00614.50
5.6.380.0030.00714.31
5.6.370.0030.01014.46
5.6.360.0040.00714.54
5.6.350.0030.01014.09
5.6.340.0020.00914.15
5.6.330.0100.00314.35
5.6.320.0070.00514.48
5.6.310.0050.00514.35
5.6.300.0050.01014.37
5.6.290.0050.00714.20
5.6.280.0050.01816.48
5.6.270.0030.00914.32
5.6.260.0050.00814.20
5.6.250.0030.00914.35
5.6.240.0020.01214.40
5.6.230.0110.00714.33
5.6.220.0060.00714.37
5.6.210.0100.02016.42
5.6.200.0030.03715.61
5.6.190.0080.02916.33
5.6.180.0170.02216.30
5.6.170.0110.03816.37
5.6.160.0070.03316.40
5.6.150.0020.02615.50
5.6.140.0090.03115.54
5.6.130.0050.02515.60
5.6.120.0050.02416.48
5.6.110.0010.03916.46
5.6.100.0040.03416.56
5.6.90.0070.01616.37
5.6.80.0100.02916.25
5.6.70.0020.01114.29
5.6.60.0050.01114.26
5.6.50.0100.00514.34
5.6.40.0020.01113.93
5.6.30.0050.00914.26
5.6.20.0060.00814.33
5.6.10.0090.00414.01
5.6.00.0000.01314.21
5.5.380.0100.00014.17
5.5.370.0060.00614.28
5.5.360.0050.00914.02
5.5.350.1480.02316.20
5.5.340.0090.02115.40
5.5.330.0040.02116.19
5.5.320.0240.02816.25
5.5.310.0170.01916.24
5.5.300.0030.02015.33
5.5.290.0060.01415.55
5.5.280.0090.03016.52
5.5.270.0080.01716.34
5.5.260.0090.02816.31
5.5.250.0120.02716.42
5.5.240.0080.03216.21
5.5.230.0020.01314.04
5.5.220.0110.00114.05
5.5.210.0020.01314.09
5.5.200.0030.01014.04
5.5.190.0060.00814.31
5.5.180.0080.00513.94
5.5.170.0070.00514.32
5.5.160.0030.01014.22
5.5.150.0080.00614.16
5.5.140.0020.01014.11
5.5.130.0050.00514.32
5.5.120.0040.00814.06
5.5.110.0100.00314.09
5.5.100.0030.01014.06
5.5.90.0070.00714.03
5.5.80.0070.00914.22
5.5.70.0080.00813.92
5.5.60.0030.00914.06
5.5.50.0080.00313.99
5.5.40.0070.00714.18
5.5.30.0050.01014.22
5.5.20.0040.00514.26
5.5.10.0050.01013.89
5.5.00.0050.01013.98

preferences:
64.98 ms | 400 KiB | 5 Q