3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is some sample'; $base = 'this is some sample [shortcode/ attr="somth"]dfdfdfdf[shortcode]text[/shortcode][shortcodeniedzialajacy]'; $pattern = "/\[(shortcode)([ ][a-zA-Z0-9\"'=\\s]*\\]|\\])/"; $matches = array(); preg_match($pattern, $string, $matches); print_r($matches);

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.0140.00416.50
8.3.50.0120.00316.63
8.3.40.0070.00718.73
8.3.30.0070.00718.79
8.3.20.0050.00220.16
8.3.10.0040.00421.66
8.3.00.0040.00423.66
8.2.180.0190.00316.38
8.2.170.0100.00322.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00020.82
8.2.110.0040.00419.37
8.2.100.0040.00717.91
8.2.90.0020.00519.17
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00417.91
8.2.50.0040.00418.09
8.2.40.0080.00020.56
8.2.30.0040.00419.45
8.2.20.0040.00417.77
8.2.10.0000.00718.02
8.2.00.0040.00418.07
8.1.280.0100.00725.92
8.1.270.0120.00322.14
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00319.20
8.1.230.0070.00420.88
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0070.00317.35
8.1.190.0050.00317.34
8.1.180.0000.00818.10
8.1.170.0030.00618.65
8.1.160.0040.00420.60
8.1.150.0040.00420.64
8.1.140.0000.00819.56
8.1.130.0030.00317.65
8.1.120.0000.00717.52
8.1.110.0040.00417.41
8.1.100.0000.00717.44
8.1.90.0000.00917.57
8.1.80.0030.00417.56
8.1.70.0000.00717.50
8.1.60.0030.00617.57
8.1.50.0030.00517.63
8.1.40.0000.00817.67
8.1.30.0040.00417.68
8.1.20.0000.00717.70
8.1.10.0040.00417.64
8.1.00.0040.00417.51
8.0.300.0030.00618.90
8.0.290.0070.00016.60
8.0.280.0030.00318.40
8.0.270.0030.00517.09
8.0.260.0030.00317.16
8.0.250.0030.00317.01
8.0.240.0030.00316.93
8.0.230.0000.00717.05
8.0.220.0040.00417.07
8.0.210.0040.00417.00
8.0.200.0030.00316.92
8.0.190.0000.00917.04
8.0.180.0070.00017.05
8.0.170.0040.00416.88
8.0.160.0030.00316.97
8.0.150.0030.00516.98
8.0.140.0030.00516.89
8.0.130.0000.00513.35
8.0.120.0040.00416.92
8.0.110.0080.00017.01
8.0.100.0070.00016.82
8.0.90.0040.00316.84
8.0.80.0130.00317.00
8.0.70.0070.00016.93
8.0.60.0080.00016.79
8.0.50.0040.00417.06
8.0.30.0100.00717.19
8.0.20.0120.01017.40
8.0.10.0050.00316.89
8.0.00.0110.00617.00
7.4.330.0050.00016.80
7.4.320.0000.00616.68
7.4.300.0040.00416.73
7.4.290.0030.00316.56
7.4.280.0000.00816.69
7.4.270.0000.00716.56
7.4.260.0040.00416.68
7.4.250.0040.00416.61
7.4.240.0000.00716.80
7.4.230.0000.00716.65
7.4.220.0100.01016.74
7.4.210.0100.02016.61
7.4.200.0070.00016.75
7.4.160.0080.00816.75
7.4.150.0100.01017.40
7.4.140.0140.00817.86
7.4.130.0090.00916.61
7.4.120.0130.00616.56
7.4.110.0090.00916.71
7.4.100.0150.00316.73
7.4.90.0030.01416.37
7.4.80.0070.01119.39
7.4.70.0110.01116.51
7.4.60.0120.00616.74
7.4.50.0070.00716.49
7.4.40.0130.00316.68
7.4.30.0110.00616.72
7.4.00.0150.00014.65
7.3.330.0060.00013.02
7.3.320.0060.00013.03
7.3.310.0000.00716.13
7.3.300.0050.00216.19
7.3.290.0050.01516.26
7.3.280.0060.01216.29
7.3.270.0130.01017.40
7.3.260.0120.00616.30
7.3.250.0110.00816.50
7.3.240.0070.01316.27
7.3.230.0120.00916.70
7.3.210.0100.00716.43
7.3.200.0070.01019.39
7.3.190.0110.00616.30
7.3.180.0100.01016.57
7.3.170.0160.00616.35
7.3.160.0100.00716.30
7.3.10.0170.00816.32
7.3.00.0080.01516.46
7.2.330.0070.01416.30
7.2.320.0090.00916.53
7.2.310.0060.01116.60
7.2.300.0100.00716.63
7.2.290.0070.01016.63
7.2.130.0200.00316.38
7.2.120.0110.00816.50
7.2.110.0080.01016.57
7.2.100.0180.00116.72
7.2.90.0170.00416.80
7.2.80.0040.01316.68
7.2.70.0090.01416.82
7.2.60.0100.00316.80
7.2.50.0050.00916.82
7.2.40.0100.01016.63
7.2.30.0130.00416.71
7.2.20.0080.00816.64
7.2.10.0130.00316.27
7.2.00.0060.00718.05
7.1.250.0090.00715.66
7.1.200.0120.00315.77
7.1.100.0030.01318.20
7.1.70.0040.00417.20
7.1.60.0070.01519.40
7.1.50.0070.00716.76
7.1.00.0070.07022.47
7.0.200.0040.00714.98
7.0.60.0170.06721.80
7.0.50.0070.08317.93
7.0.40.0030.04320.06
7.0.30.0500.06720.19
7.0.20.0300.07720.02
7.0.10.0070.05020.21
7.0.00.0070.03720.19
5.6.280.0000.03320.81
5.6.210.0070.04020.61
5.6.200.0030.04318.09
5.6.190.0100.08020.77
5.6.180.0270.04720.32
5.6.170.0170.04320.48
5.6.160.0100.07720.48
5.6.150.0130.05018.11
5.6.140.0130.04718.22
5.6.130.0070.08018.12
5.6.120.0030.09021.01
5.6.110.0170.07320.98
5.6.100.0000.05021.02
5.6.90.0070.07321.02
5.6.80.0030.07020.50
5.5.350.0300.06720.40
5.5.340.0100.07318.03
5.5.330.0130.07020.25
5.5.320.0570.07020.24
5.5.310.0370.04320.26
5.5.300.0100.05017.87
5.5.290.0030.06018.02
5.5.280.0100.03320.75
5.5.270.0100.07720.88
5.5.260.0130.07720.86
5.5.250.0200.07320.70
5.5.240.0300.06020.14

preferences:
109.63 ms | 400 KiB | 5 Q