3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '~ (?<animal>) (?<color>) ^ (?<animal>DOG|CAT)? (?<color>RED|BLUE)? $ ~xiJ'; if ( preg_match($pattern, 'dog', $m) ) print_r(array_filter($m, 'is_string', ARRAY_FILTER_USE_KEY));

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.00720.22
8.5.20.0020.00620.09
8.5.10.0120.00520.60
8.5.00.0160.00520.34
8.4.180.0130.00919.92
8.4.170.0060.00423.93
8.4.160.0100.01323.50
8.4.150.0080.00416.94
8.4.140.0160.00517.65
8.4.130.0100.01017.89
8.4.120.0120.00520.63
8.4.110.0100.01020.56
8.4.100.0140.00718.92
8.4.90.0040.00520.73
8.4.80.0030.00619.77
8.4.70.0040.00417.86
8.4.60.0100.01018.95
8.4.50.0120.00818.91
8.4.40.0100.00017.74
8.4.30.0120.00318.67
8.4.20.0070.01517.68
8.4.10.0030.00617.87
8.3.300.0120.00921.00
8.3.290.0150.00720.77
8.3.280.0140.00818.59
8.3.270.0100.01016.52
8.3.260.0140.00616.63
8.3.250.0100.00818.83
8.3.240.0120.00816.63
8.3.230.0110.00916.37
8.3.220.0090.00917.00
8.3.210.0080.01016.57
8.3.200.0050.00316.57
8.3.190.0090.00917.10
8.3.180.0020.00618.43
8.3.170.0100.01017.22
8.3.160.0060.01216.64
8.3.150.0110.00718.75
8.3.140.0120.00618.70
8.3.130.0030.00618.61
8.3.120.0060.00318.70
8.3.110.0110.00720.94
8.3.100.0040.00424.06
8.3.90.0030.00526.77
8.3.80.0040.00416.50
8.3.70.0040.01118.56
8.3.60.0130.01016.50
8.3.50.0090.01220.41
8.3.40.0100.01018.88
8.3.30.0060.00818.85
8.3.20.0080.00024.18
8.3.10.0050.00324.66
8.3.00.0000.00826.16
8.2.300.0130.00922.19
8.2.290.0120.00620.50
8.2.280.0080.00722.51
8.2.270.0130.00617.07
8.2.260.0070.01118.60
8.2.250.0080.00016.73
8.2.240.0130.00617.13
8.2.230.0050.00322.58
8.2.220.0090.00037.54
8.2.210.0070.01026.77
8.2.200.0060.00616.75
8.2.190.0040.01116.75
8.2.180.0040.01225.92
8.2.170.0110.00419.06
8.2.160.0110.00422.96
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0080.00022.29
8.2.100.0060.00618.03
8.2.90.0000.00817.75
8.2.80.0040.00418.91
8.2.70.0040.00417.75
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0020.00518.01
8.2.30.0040.00417.93
8.2.20.0000.00820.51
8.2.10.0050.00317.70
8.2.00.0050.00319.13
8.1.340.0130.00717.78
8.1.330.0100.00921.97
8.1.320.0100.00716.38
8.1.310.0080.00018.52
8.1.300.0060.00318.50
8.1.290.0000.00918.88
8.1.280.0100.00725.92
8.1.270.0080.00023.99
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0060.00320.41
8.1.230.0120.00017.64
8.1.220.0050.00317.76
8.1.210.0030.00518.77
8.1.200.0030.00717.47
8.1.190.0000.00817.48
8.1.180.0060.00318.10
8.1.170.0040.00418.78
8.1.160.0040.00418.80
8.1.150.0040.00418.71
8.1.140.0000.00817.58
8.1.130.0050.00220.18
8.1.120.0070.00017.51
8.1.110.0040.00417.47
8.1.100.0000.00717.54
8.1.90.0030.00317.57
8.1.80.0040.00417.52
8.1.70.0050.00317.57
8.1.60.0040.00417.70
8.1.50.0030.00517.63
8.1.40.0030.00517.61
8.1.30.0030.00517.73
8.1.20.0040.00417.62
8.1.10.0000.00817.50
8.1.00.0000.00817.42
8.0.300.0050.00518.77
8.0.290.0050.00216.75
8.0.280.0000.00820.25
8.0.270.0000.00819.93
8.0.260.0080.00018.46
8.0.250.0030.00317.02
8.0.240.0030.00316.96
8.0.230.0080.00017.07
8.0.220.0030.00316.97
8.0.210.0000.00816.89
8.0.200.0050.00217.00
8.0.190.0060.00317.01
8.0.180.0000.00816.94
8.0.170.0080.00016.99
8.0.160.0060.00317.04
8.0.150.0000.00816.94
8.0.140.0040.00416.91
8.0.130.0050.00316.87
8.0.120.0000.00717.00
8.0.110.0040.00416.80
8.0.100.0070.00017.00
8.0.90.0040.00416.88
8.0.80.0000.00716.93
8.0.70.0030.00516.89
8.0.60.0000.00716.97
8.0.50.0040.00416.90
8.0.30.0000.00716.88
8.0.20.0030.00316.95
8.0.10.0050.00317.05
7.4.330.0000.00515.55
7.4.320.0060.00016.61
7.4.300.0030.00316.73
7.4.290.0030.00316.59
7.4.280.0100.00316.73
7.4.270.0030.00316.49
7.4.260.0000.00716.60
7.4.250.0070.00016.70
7.4.240.0000.00716.59
7.4.230.0070.00016.54
7.4.220.0070.00016.63
7.4.210.0030.00316.46
7.4.200.0050.00316.54
7.4.190.0030.00316.80
7.4.180.0000.00716.62
7.4.160.0000.00716.31
7.4.150.0000.00816.70
7.4.140.0000.00816.41
7.4.130.0050.00316.62
7.4.120.0030.00616.63
7.4.110.0000.00816.45
7.4.100.0080.00016.66
7.4.90.0070.00016.59
7.4.80.0000.00816.60
7.4.70.0080.00016.72
7.4.60.0040.00416.70
7.4.50.0040.00416.59
7.4.40.0070.00016.40
7.4.30.0070.00016.40
7.4.20.0030.00316.47
7.4.10.0000.00716.48
7.4.00.0000.00816.57

preferences:
100.01 ms | 1246 KiB | 5 Q