3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = str_repeat('a', 1e4); $start = microtime(true); $pos = 0; while(preg_match('/\G\w/', $str, $m, 0, $pos)) ++$pos; $end = microtime(true); echo 'NO u flag: ', number_format(($end - $start)*1000, 6), 'ms', PHP_EOL; $str = str_repeat('e', 1e4); $start = microtime(true); $pos = 0; while(preg_match('/\G\w/u', $str, $m, 0, $pos)) ++$pos; $end = microtime(true); echo 'WITH u flag: ', number_format(($end - $start)*1000, 6), 'ms', PHP_EOL;

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)
7.4.00.0030.01615.22
7.3.120.0060.08014.96
7.3.110.0070.05314.92
7.3.100.0070.04615.08
7.3.90.0070.04915.24
7.3.80.0130.03614.66
7.3.70.0060.04414.91
7.3.60.0100.04215.13
7.3.50.0030.04514.95
7.3.40.0070.04315.15
7.3.30.0070.04815.08
7.3.20.0030.04616.50
7.3.10.0060.03916.67
7.3.00.0100.03916.49
7.2.250.0030.09815.27
7.2.240.0100.10415.22
7.2.230.0000.07415.31
7.2.220.0070.06915.15
7.2.210.0100.06615.16
7.2.200.0060.06115.32
7.2.190.0030.07014.88
7.2.180.0030.07715.35
7.2.170.0030.10015.27
7.2.160.0030.07915.21
7.2.150.0130.06317.18
7.2.140.0130.06217.16
7.2.130.0030.06717.04
7.2.120.0030.06517.00
7.2.110.0070.06717.07
7.2.100.0030.06717.15
7.2.90.0070.06616.82
7.2.80.0000.07517.04
7.2.70.0060.08716.80
7.2.60.0130.06617.25
7.2.50.0070.06217.18
7.2.40.0070.07517.10
7.2.30.0100.07217.25
7.2.20.0060.06717.04
7.2.10.0030.06917.10
7.2.00.0030.07418.45
7.1.330.0060.08316.18
7.1.320.0030.07516.03
7.1.310.0100.06515.89
7.1.300.0070.07615.90
7.1.290.0070.10115.89
7.1.280.0100.06115.97
7.1.270.0030.07515.63
7.1.260.0000.07616.05
7.1.250.0030.06715.82
7.1.240.0000.06915.98
7.1.230.0030.06815.94
7.1.220.0100.06815.95
7.1.210.0030.06815.80
7.1.200.0000.10315.82
7.1.190.0000.07315.68
7.1.180.0070.06616.01
7.1.170.0030.07116.04
7.1.160.0060.09916.05
7.1.150.0130.07015.90
7.1.140.0070.06815.86
7.1.130.0030.08015.96
7.1.120.0160.06915.74
7.1.110.0030.07515.94
7.1.100.0070.07515.93
7.1.90.0000.08216.06
7.1.80.0030.12815.72
7.1.70.0070.10716.54
7.1.60.0070.10117.86
7.1.50.0020.10116.54
7.1.40.0030.06615.98
7.1.30.0000.07115.85
7.1.20.0000.07415.90
7.1.10.0070.06615.93
7.1.00.0000.12319.05
7.0.330.0000.06815.64
7.0.320.0030.06915.55
7.0.310.0070.07615.70
7.0.300.0070.06315.63
7.0.290.0160.07815.42
7.0.280.0030.07515.66
7.0.270.0000.07115.52
7.0.260.0070.09015.62
7.0.250.0070.11415.40
7.0.240.0000.07815.45
7.0.230.0030.07215.49
7.0.220.0000.07415.50
7.0.210.0060.06815.71
7.0.200.0200.08415.33
7.0.190.0030.07215.41
7.0.180.0000.07215.65
7.0.170.0060.06815.38
7.0.160.0100.06315.61
7.0.150.0000.07115.51
7.0.140.0030.06515.62
7.0.130.0130.06115.58
7.0.120.0070.06615.65
7.0.110.0100.06615.23
7.0.100.0020.11217.77
7.0.90.0030.11517.69
7.0.80.0030.12217.90
7.0.70.0080.08417.78
7.0.60.0170.11117.78
7.0.50.0120.09017.95
7.0.40.0030.09816.79
7.0.30.0080.10816.87
7.0.20.0070.10816.77
7.0.10.0030.11816.98
7.0.00.0020.10216.90
5.6.400.0030.07814.77
5.6.390.0100.07414.14
5.6.380.0070.07714.57
5.6.370.0030.07914.13
5.6.360.0060.07414.14
5.6.350.0070.07614.45
5.6.340.0100.08314.69
5.6.330.0100.13514.30
5.6.320.0070.07914.59
5.6.310.0070.07914.64
5.6.300.0030.07914.48
5.6.290.0030.08014.48
5.6.280.0070.07514.18
5.6.270.0000.11414.46
5.6.260.0130.07014.05
5.6.250.0020.10717.52
5.6.240.0050.11517.43
5.6.230.0130.09317.44
5.6.220.0100.10917.54
5.6.210.0120.11517.54
5.6.200.0130.11917.79
5.6.190.0050.11417.68
5.6.180.0080.09517.89
5.6.170.0020.12417.64
5.6.160.0120.11817.60
5.6.150.0030.10117.67
5.6.140.0070.09817.76
5.6.130.0100.12017.82
5.6.120.0060.09717.72
5.6.110.0060.11717.67
5.6.100.0030.09917.67
5.6.90.0100.10717.59
5.6.80.0030.09317.41
5.6.70.0050.09217.38
5.6.60.0030.10617.27
5.6.50.0030.11817.28
5.6.40.0070.12217.35
5.6.30.0100.09017.24
5.6.20.0080.11817.31
5.6.10.0050.11817.42
5.6.00.0100.11617.43

preferences:
41.82 ms | 401 KiB | 5 Q