3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\[[^][\d]*\K\d+(?:\.\d+)?(?=[^][]*])/'; $str = 'I have the following expression [+₪7.00], I wish to extract only 7.00 or 7.'; if (preg_match_all($re, $str, $matches)) { print_r($matches[0]); }

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.4.130.0100.00817.89
8.4.120.0110.00920.59
8.4.110.0020.00718.51
8.4.100.0140.00518.75
8.4.90.0100.01020.82
8.4.80.0120.00719.77
8.4.70.0140.00617.77
8.4.60.0110.01018.98
8.4.50.0040.00519.80
8.4.40.0080.00017.95
8.4.30.0060.01320.45
8.4.20.0130.00318.09
8.4.10.0100.00625.82
8.3.260.0130.00716.75
8.3.250.0110.00718.68
8.3.240.0100.01016.48
8.3.230.0040.00416.61
8.3.220.0110.00518.96
8.3.210.0060.00916.74
8.3.200.0040.00516.66
8.3.190.0110.00816.88
8.3.180.0130.00618.39
8.3.170.0130.00618.61
8.3.160.0190.00018.27
8.3.150.0150.00318.82
8.3.140.0050.00318.42
8.3.130.0080.00018.38
8.3.120.0110.00720.74
8.3.110.0040.01120.94
8.3.100.0060.00324.06
8.3.90.0120.00326.77
8.3.80.0070.00316.63
8.3.70.0070.01016.75
8.3.60.0110.00418.55
8.3.50.0100.00724.39
8.3.40.0120.00318.97
8.3.30.0060.00918.94
8.3.20.0060.00324.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.290.0090.01016.93
8.2.280.0120.00518.57
8.2.270.0150.00317.33
8.2.260.0040.00418.77
8.2.250.0060.00316.93
8.2.240.0040.00419.06
8.2.230.0060.00322.58
8.2.220.0030.00537.54
8.2.210.0080.00026.77
8.2.200.0100.00016.75
8.2.190.0110.00416.60
8.2.180.0070.01625.92
8.2.170.0070.00718.98
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0110.00022.25
8.2.100.0070.00417.91
8.2.90.0040.00418.09
8.2.80.0000.00917.97
8.2.70.0050.00517.88
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0000.00818.04
8.2.30.0080.00018.19
8.2.20.0030.00618.02
8.2.10.0040.00420.64
8.2.00.0040.00419.09
8.1.330.0100.00916.21
8.1.320.0110.01118.00
8.1.310.0180.00018.71
8.1.300.0110.00718.25
8.1.290.0030.00618.88
8.1.280.0040.01125.92
8.1.270.0080.00023.96
8.1.260.0050.00326.35
8.1.250.0160.00328.09
8.1.240.0060.00324.00
8.1.230.0000.01222.60
8.1.220.0000.00817.74
8.1.210.0030.00618.80
8.1.200.0060.00617.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0030.00618.69
8.1.160.0030.00518.86
8.1.150.0040.00418.84
8.1.140.0000.00718.85
8.1.130.0000.00720.03
8.1.120.0070.00017.46
8.1.110.0040.00417.43
8.1.100.0030.00517.54
8.1.90.0040.00417.51
8.1.80.0040.00417.50
8.1.70.0080.00017.49
8.1.60.0000.00817.61
8.1.50.0000.01017.49
8.1.40.0000.00817.61
8.1.30.0040.00417.74
8.1.20.0090.00017.68
8.1.10.0080.00017.75
8.1.00.0000.00817.67
8.0.300.0070.00019.91
8.0.290.0040.00416.75
8.0.280.0000.00718.27
8.0.270.0040.00418.13
8.0.260.0030.00318.43
8.0.250.0050.00217.04
8.0.240.0030.00316.93
8.0.230.0000.00717.05
8.0.220.0070.00316.90
8.0.210.0070.00016.96
8.0.200.0030.00317.02
8.0.190.0060.00317.05
8.0.180.0040.00417.05
8.0.170.0060.00317.00
8.0.160.0020.00516.94
8.0.150.0040.00416.94
8.0.140.0070.00016.92
8.0.130.0050.00013.45
8.0.120.0000.00816.96
8.0.110.0040.00417.09
8.0.100.0000.00716.82
8.0.90.0040.00316.96
8.0.80.0120.00516.98
8.0.70.0040.00416.98
8.0.60.0050.00316.86
8.0.50.0080.00016.97
8.0.30.0210.00016.91
8.0.20.0050.01517.40
8.0.10.0100.01017.40
8.0.00.0100.01317.40
7.4.330.0000.00415.55
7.4.320.0030.00316.66
7.4.300.0000.00816.64
7.4.290.0030.00616.68
7.4.280.0080.00016.73
7.4.270.0080.00016.66
7.4.260.0050.00213.36
7.4.250.0050.00316.64
7.4.240.0030.00516.68
7.4.230.0030.00516.63
7.4.220.0020.00516.66
7.4.210.0070.00816.68
7.4.200.0000.00816.74
7.4.150.0190.00017.40
7.4.140.0110.01117.40
7.4.130.0160.01317.40
7.4.120.0060.01417.40
7.4.110.0160.01017.40
7.4.100.0080.01217.40
7.4.90.0100.01017.40
7.4.80.0130.00717.40
7.4.70.0140.00417.40
7.4.60.0150.00917.40
7.4.50.0140.01017.40
7.4.40.0220.00017.40
7.4.30.0090.00917.40
7.4.20.0070.01117.40
7.4.10.0060.01217.40
7.4.00.0150.00617.40
7.3.330.0000.00616.42
7.3.320.0060.00013.14
7.3.310.0030.00316.31
7.3.300.0000.00716.30
7.3.290.0090.00816.38
7.3.270.0090.01217.40
7.3.260.0120.01217.40
7.3.250.0110.01117.40
7.3.240.0090.01717.40
7.3.230.0090.01117.40
7.3.220.0110.00717.40
7.3.210.0090.00917.40
7.3.200.0200.00017.40
7.3.190.0140.00417.40
7.3.180.0120.00917.40
7.3.170.0060.01217.40
7.3.160.0110.00817.40
7.3.150.0080.01717.40
7.3.140.0050.01317.40
7.3.130.0130.00717.40
7.3.120.0190.00017.40
7.3.110.0110.00717.40
7.3.100.0160.00817.40
7.3.90.0090.00917.40
7.3.80.0130.00617.40
7.3.70.0070.01117.40
7.3.60.0100.00917.40
7.3.50.0220.00517.40
7.3.40.0030.01417.40
7.3.30.0150.00617.40
7.3.20.0100.00717.40
7.3.10.0100.01117.40
7.3.00.0130.01017.40
5.6.330.0130.00015.81

preferences:
29.07 ms | 403 KiB | 5 Q