3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'œ'; preg_match_all('/[^[:alnum:]]/', $str, $matches); echo "The string is read byte by byte, \nthe pattern matches the two bytes of œ separately.\n"; print_r($matches[0]); preg_match_all('/[^[:alnum:]]/u', $str, $matches); echo "\nThe string is read code point by code point encoded in utf-8,\nbut since [:alnum:] is extended,\nit contains œ, so there's no match.\n"; print_r($matches[0]); preg_match_all('/(*UCP)[^[:alnum:]]/', $str, $matches, PREG_OFFSET_CAPTURE); echo "\nThe string is read byte by byte,\nand because [:alnum:] contains œ with (*UCP),\nit fails at position 0 but succeeds on the second byte at position 1.\n"; print_r($matches[0]); preg_match_all('/(*UTF)[^[:alnum:]]/', $str, $matches); echo "\nThe string is read code point by code point,\n[:alnum:] doesn't contain œ,\nthe pattern matches at position 0 and return a code point.\n"; 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.5.30.0090.00718.66
8.5.20.0120.00719.51
8.5.10.0030.00516.78
8.5.00.0100.01020.18
8.4.180.0050.00625.76
8.4.170.0130.00823.73
8.4.160.0150.00819.91
8.4.150.0080.00417.08
8.4.140.0120.00917.83
8.4.130.0140.00718.14
8.4.120.0100.01124.20
8.4.110.0070.00620.62
8.4.100.0130.00718.91
8.4.90.0140.00620.53
8.4.80.0110.01018.04
8.4.70.0120.00818.18
8.4.60.0120.00919.13
8.4.50.0130.00518.68
8.4.40.0040.01517.83
8.4.30.0150.00418.86
8.4.20.0120.00919.55
8.4.10.0130.00319.95
8.3.300.0100.01120.56
8.3.290.0130.00721.03
8.3.280.0150.00518.66
8.3.270.0120.00816.77
8.3.260.0090.00516.64
8.3.250.0050.00517.05
8.3.240.0110.00817.16
8.3.230.0140.00616.83
8.3.220.0090.00917.18
8.3.210.0100.01116.66
8.3.200.0100.00316.88
8.3.190.0090.01119.04
8.3.180.0090.00916.94
8.3.170.0040.01420.86
8.3.160.0130.00616.57
8.3.150.0120.00616.94
8.3.140.0030.00517.13
8.3.130.0090.00018.46
8.3.120.0040.00420.61
8.3.110.0030.00620.94
8.3.100.0090.00016.87
8.3.90.0040.00426.77
8.3.80.0090.00017.00
8.3.70.0110.00718.68
8.3.60.0040.01116.88
8.3.50.0180.00318.21
8.3.40.0070.00719.12
8.3.30.0060.00919.01
8.3.20.0000.00824.18
8.3.10.0000.00824.66
8.3.00.0030.00626.16
8.2.300.0130.00918.26
8.2.290.0110.00722.35
8.2.280.0120.00718.63
8.2.270.0190.00017.18
8.2.260.0120.00616.91
8.2.250.0030.00617.10
8.2.240.0030.00717.18
8.2.230.0050.00522.58
8.2.220.0030.00624.06
8.2.210.0120.00626.77
8.2.200.0000.00916.88
8.2.190.0130.01016.75
8.2.180.0110.00425.92
8.2.170.0070.00719.20
8.2.160.0100.01022.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00421.00
8.2.110.0030.00620.52
8.2.100.0080.00318.09
8.2.90.0050.00318.44
8.2.80.0040.00817.97
8.2.70.0050.00317.87
8.2.60.0050.00317.88
8.2.50.0040.00417.75
8.2.40.0040.00419.85
8.2.30.0040.00417.99
8.2.20.0040.00419.54
8.2.10.0060.00317.80
8.2.00.0060.00319.17
8.1.340.0130.00717.92
8.1.330.0120.00721.98
8.1.320.0090.01018.61
8.1.310.0090.00616.62
8.1.300.0110.00720.30
8.1.290.0090.00018.88
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00723.78
8.1.230.0080.00322.11
8.1.220.0050.00317.78
8.1.210.0030.00618.77
8.1.200.0040.00417.35
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0040.00417.89
8.1.160.0000.00718.90
8.1.150.0000.00718.82
8.1.140.0060.00317.64
8.1.130.0050.00319.00
8.1.120.0040.00417.59
8.1.110.0080.00017.58
8.1.100.0000.00817.60
8.1.90.0050.00317.53
8.1.80.0090.00017.53
8.1.70.0070.00017.59
8.1.60.0070.00017.70
8.1.50.0030.00617.54
8.1.40.0040.00417.61
8.1.30.0040.00417.64
8.1.20.0040.00417.75
8.1.10.0040.00417.66
8.1.00.0060.00317.57
8.0.300.0040.00420.11
8.0.290.0040.00416.88
8.0.280.0000.00718.15
8.0.270.0000.00717.10
8.0.260.0000.00718.51
8.0.250.0000.00816.98
8.0.240.0060.00317.17
8.0.230.0000.00717.08
8.0.220.0000.00717.17
8.0.210.0080.00017.10
8.0.200.0070.00017.08
8.0.190.0000.00717.10
8.0.180.0000.00717.15
8.0.170.0030.00617.07
8.0.160.0000.00717.03
8.0.150.0040.00416.87
8.0.140.0060.00316.91
8.0.130.0030.00313.55
8.0.120.0040.00413.56
8.0.110.0000.00613.46
8.0.100.0040.00413.59
8.0.90.0040.00413.58
8.0.80.0030.00313.54
8.0.70.0050.00213.57
8.0.60.0030.00313.59
8.0.50.0060.00413.10
8.0.30.0100.00013.56
8.0.20.0000.01113.33
8.0.10.0120.00013.34
8.0.00.0050.00213.52
7.4.330.0000.00515.55
7.4.320.0000.00616.75
7.4.300.0060.00016.73
7.4.290.0080.00016.61
7.4.280.0030.00616.59
7.4.270.0000.00716.59
7.4.260.0050.00013.48
7.4.250.0070.00713.36
7.4.240.0120.00013.27
7.4.230.0110.00013.21
7.4.220.0080.00513.37
7.4.210.0130.00013.35
7.4.200.0110.00013.27
7.4.190.0120.00013.43
7.4.180.0040.00913.41
7.4.160.0100.00013.36
7.4.150.0000.01313.36
7.4.140.0000.01113.17
7.4.130.0120.00013.22
7.4.120.0060.00613.14
7.4.110.0130.00013.37
7.4.100.0120.00013.44
7.4.90.0130.00012.95
7.4.80.0130.00013.36
7.4.70.0000.01313.18
7.4.60.0080.00413.13
7.4.50.0060.00613.18
7.4.40.0000.00913.28
7.4.30.0080.00313.10
7.4.20.0040.00713.13
7.4.10.0070.00513.19
7.4.00.0110.00012.95
7.3.330.0000.00716.49
7.3.320.0070.00713.01
7.3.310.0060.00613.09
7.3.300.0080.00513.00
7.3.290.0070.00512.91
7.3.280.0120.00013.22
7.3.270.0080.00413.13
7.3.260.0120.00013.08
7.3.250.0120.00013.12
7.3.240.0120.00013.29
7.3.230.0070.00212.95
7.3.220.0030.00712.57
7.3.210.0070.00313.02
7.3.200.0080.00413.06
7.3.190.0140.00013.33
7.3.180.0110.00012.98
7.3.170.0060.00413.11
7.3.160.0130.00012.75
7.3.150.0050.00512.98
7.3.140.0090.00413.07
7.3.130.0120.00012.80
7.3.120.0060.00612.97
7.3.110.0060.00612.76
7.3.100.0120.00012.93
7.3.90.0000.01212.96
7.3.80.0100.00213.09
7.3.70.0100.00013.03
7.3.60.0110.00013.25
7.3.50.0140.00012.97
7.3.40.0080.00413.26
7.3.30.0000.01313.03
7.3.20.0060.00514.71
7.3.10.0140.00214.97
7.3.00.0110.00314.59

preferences:
49.08 ms | 1539 KiB | 5 Q