3v4l.org

run code in 300+ PHP versions simultaneously
<?php <pre><?php $str = 'NAME OF ITEM 123456789012 OTHER NAME 987654321098 NAME 567890123456'; preg_match_all( '/^(.*?)\s+(\d+)$/m', $str, $matches); var_dump( $matches); $items = array(); foreach( $matches[2] as $k => $upc) { $items[$upc] = $matches[1][$k]; } var_dump( $items);

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)
5.4.150.0030.04319.18
5.4.140.0000.04016.50
5.4.130.0030.08016.41
5.4.120.0170.07016.34
5.4.110.0100.04016.46
5.4.100.0070.07316.30
5.4.90.0100.06716.39
5.4.80.0000.05316.41
5.4.70.0030.03716.45
5.4.60.0030.03716.64
5.4.50.0070.06316.27
5.4.40.0070.06016.38
5.4.30.0100.05016.36
5.4.20.0030.06716.36
5.4.10.0000.04316.27
5.4.00.0000.04015.75
5.3.250.0170.06714.57
5.3.240.0130.06714.55
5.3.230.0170.05714.42
5.3.220.0100.05714.39
5.3.210.0130.04714.50
5.3.200.0070.07014.41
5.3.190.0100.07714.66
5.3.180.0130.07314.36
5.3.170.0100.06014.53
5.3.160.0070.04714.46
5.3.150.0030.05014.49
5.3.140.0100.04714.46
5.3.130.0000.08714.64
5.3.120.0100.03714.47
5.3.110.0030.04014.51
5.3.100.0030.04314.05
5.3.90.0030.04013.95
5.3.80.0100.03313.85
5.3.70.0070.03713.85
5.3.60.0070.03713.92
5.3.50.0030.03713.87
5.3.40.0000.04313.76
5.3.30.0070.07013.74
5.3.20.0030.07013.62
5.3.10.0130.05313.44
5.3.00.0000.06313.42

preferences:
137.96 ms | 1398 KiB | 7 Q