3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = array( 'to' => array( array( 'foo'=>'bar', 'email' => 'blablab'), array('bar'=>'foo1', 'email' => 'test@example.com'), array('bar'=>'foo2', 'email' => 'test@wp.com'), array('bar'=>'fo3', 'email' => 'test@blabla.com'), array('bar'=>'foo4', 'email' => 'test@onet.com'), array('bar'=>'foo5', 'email' => 'test@example.com'), array('bar'=>'foo6', 'email' => 'test@gmail.com') )); $recipients = array_filter($message['to'], function ($to) { $found = preg_match('/@.*\.?example\./i', $to['email'], $result); return !($found !== 0 && $found !== false); }); var_dump($recipients);

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.3.60.0140.00018.43
8.3.50.0110.00922.20
8.3.40.0090.00619.05
8.3.30.0090.00619.05
8.3.20.0070.00020.10
8.3.10.0040.00423.50
8.3.00.0060.00319.78
8.2.180.0040.01116.63
8.2.170.0070.01022.96
8.2.160.0070.01320.36
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.74
8.2.110.0100.00720.52
8.2.100.0110.00018.09
8.2.90.0000.00819.21
8.2.80.0040.00417.97
8.2.70.0030.00517.88
8.2.60.0040.00717.93
8.2.50.0090.00018.07
8.2.40.0090.00019.86
8.2.30.0000.00718.20
8.2.20.0000.00917.90
8.2.10.0040.00418.15
8.2.00.0000.00718.06
8.1.280.0090.00625.92
8.1.270.0080.00020.38
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00423.80
8.1.230.0070.00419.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00418.61
8.1.160.0070.00022.02
8.1.150.0040.00718.89
8.1.140.0000.00817.52
8.1.130.0000.00717.77
8.1.120.0040.00417.68
8.1.110.0050.00317.63
8.1.100.0000.00817.58
8.1.90.0040.00417.56
8.1.80.0000.00817.64
8.1.70.0040.00417.65
8.1.60.0030.00617.76
8.1.50.0090.00017.67
8.1.40.0030.00517.65
8.1.30.0040.00417.82
8.1.20.0070.00017.70
8.1.10.0080.00017.56
8.1.00.0000.00817.71
8.0.300.0000.00718.77
8.0.290.0050.00316.88
8.0.280.0030.00318.34
8.0.270.0050.00217.28
8.0.260.0070.00017.15
8.0.250.0050.00317.09
8.0.240.0030.00516.99
8.0.230.0070.00017.12
8.0.220.0030.00317.05
8.0.210.0070.00017.10
8.0.200.0060.00016.97
8.0.190.0000.00917.02
8.0.180.0030.00517.10
8.0.170.0040.00417.07
8.0.160.0040.00417.07
8.0.150.0040.00417.04
8.0.140.0040.00416.98
8.0.130.0050.00013.49
8.0.120.0090.00017.04
8.0.110.0000.00816.96
8.0.100.0040.00417.02
8.0.90.0000.00816.83
8.0.80.0110.01017.04
8.0.70.0030.00517.10
8.0.60.0050.00317.02
8.0.50.0040.00416.94
8.0.30.0130.00617.18
8.0.20.0100.01217.40
8.0.10.0050.00217.19
8.0.00.0100.01117.05
7.4.330.0000.00515.10
7.4.320.0060.00016.88
7.4.300.0000.00716.70
7.4.290.0040.00416.70
7.4.280.0030.00516.76
7.4.270.0030.00316.81
7.4.260.0080.00016.72
7.4.250.0040.00416.73
7.4.240.0040.00316.65
7.4.230.0000.00716.82
7.4.220.0090.01216.80
7.4.210.0090.00616.93
7.4.200.0040.00416.79
7.4.160.0030.01316.71
7.4.150.0120.00717.40
7.4.140.0130.01017.86
7.4.130.0120.01016.64
7.4.120.0110.00916.72
7.4.110.0140.00516.89
7.4.100.0130.00616.63
7.4.90.0090.00916.64
7.4.80.0110.00819.39
7.4.70.0150.00416.60
7.4.60.0090.00916.98
7.4.50.0000.00716.75
7.4.40.0070.01016.68
7.4.30.0170.00716.56
7.4.00.0080.01015.18
7.3.330.0050.00213.40
7.3.320.0030.00313.43
7.3.310.0030.00316.35
7.3.300.0000.00716.33
7.3.290.0090.00716.41
7.3.280.0080.00716.40
7.3.270.0110.00717.40
7.3.260.0160.00716.49
7.3.250.0140.00816.48
7.3.240.0100.00716.43
7.3.230.0120.00716.39
7.3.210.0060.01216.79
7.3.200.0020.02316.64
7.3.190.0060.01216.64
7.3.180.0120.00616.43
7.3.170.0100.01016.74
7.3.160.0060.01216.48
7.3.120.0030.01015.21
7.3.110.0030.01415.32
7.3.100.0000.01314.79
7.3.90.0040.01114.99
7.3.80.0050.00515.25
7.3.70.0060.01215.02
7.3.60.0000.01114.89
7.3.50.0060.00915.05
7.3.40.0150.00014.80
7.3.30.0090.00315.03
7.3.20.0000.01416.71
7.3.10.0000.01116.70
7.3.00.0140.00316.55
7.2.330.0100.01416.70
7.2.320.0100.00816.70
7.2.310.0070.01016.77
7.2.300.0130.01016.85
7.2.290.0110.01116.82
7.2.250.0100.01015.45
7.2.240.0070.01115.36
7.2.230.0100.00615.25
7.2.220.0000.01315.35
7.2.210.0090.00615.06
7.2.200.0000.00915.15
7.2.190.0060.00615.32
7.2.180.0000.01515.26
7.2.170.0090.00615.20
7.2.00.0000.01219.67
7.1.330.0100.00716.13
7.1.320.0090.00616.07
7.1.310.0030.01015.68
7.1.300.0000.01415.58
7.1.290.0030.00915.85
7.1.280.0030.00716.14
7.1.270.0040.00816.12
7.1.260.0040.00815.98
7.1.100.0070.00718.22
7.1.70.0050.00317.24
7.1.60.0090.00619.86
7.1.50.0160.01017.12
7.1.00.0030.08022.46
7.0.200.0050.00316.90
7.0.60.0130.07021.81
7.0.50.0130.07317.98
7.0.40.0030.04320.22
7.0.30.0270.05320.22
7.0.20.0230.06720.07
7.0.10.0030.04320.20
7.0.00.0030.05020.21
5.6.280.0070.06720.86
5.6.210.0070.08720.51
5.6.200.0100.04718.22
5.6.190.0070.04320.57
5.6.180.0070.05020.42
5.6.170.0230.05320.44
5.6.160.0170.03720.56
5.6.150.0000.08718.15
5.6.140.0030.03718.28
5.6.130.0000.04718.23
5.6.120.0100.08321.05
5.6.110.0130.07721.03
5.6.100.0070.06721.14
5.6.90.0030.08321.08
5.6.80.0130.06720.29
5.5.350.0070.03320.34
5.5.340.0070.07718.03
5.5.330.0130.03320.44
5.5.320.0230.06720.30
5.5.310.0270.07720.24
5.5.300.0070.06718.07
5.5.290.0200.07018.07
5.5.280.0070.08020.88
5.5.270.0170.06720.73
5.5.260.0130.05320.66
5.5.250.0170.07020.58
5.5.240.0130.03020.28
5.4.450.1000.04019.46
5.4.440.0430.04319.55
5.4.430.0200.05719.41
5.4.420.0230.04319.54
5.4.410.0070.05719.32
5.4.400.0100.05019.21
5.4.390.0070.05319.11
5.4.380.0130.05319.11
5.4.370.0100.05319.24
5.4.360.0070.05719.13
5.4.350.0130.05319.24
5.4.340.0200.04719.11
5.4.320.0000.06319.25
5.4.310.0170.05019.13
5.4.300.0170.04719.11
5.4.290.0130.05319.20
5.4.280.0200.04718.98
5.4.270.0070.05719.12
5.4.260.0130.05019.08
5.4.250.0070.05719.06
5.4.240.0100.05319.20
5.4.230.0130.06719.11
5.4.220.0100.05319.10
5.4.210.0100.05718.97
5.4.200.0130.06316.64
5.4.190.0230.04019.19
5.4.180.0100.05719.13
5.4.170.0070.05719.09
5.4.160.0170.05019.10
5.4.150.0100.05319.13
5.4.140.0070.06716.50
5.4.130.0100.06716.32
5.4.120.0170.06316.28
5.4.110.0100.04716.66
5.4.100.0070.05316.66
5.4.90.0200.04016.25
5.4.80.0100.04716.24
5.4.70.0000.06016.45
5.4.60.0130.04716.55
5.4.50.0130.04716.29
5.4.40.0000.06016.32
5.4.30.0170.04316.31
5.4.20.0130.05016.45
5.4.10.0170.04716.59
5.4.00.0130.04716.09
5.3.290.0100.05014.66
5.3.280.0070.05314.69
5.3.270.0030.06714.52
5.3.260.0130.05014.71
5.3.250.0100.05714.81
5.3.240.0100.05014.57
5.3.230.0030.06014.81
5.3.220.0100.05014.66
5.3.210.0170.04314.53
5.3.200.0170.04314.77
5.3.190.0130.06714.53
5.3.180.0200.03714.63
5.3.170.0230.05714.63
5.3.160.0170.04714.64
5.3.150.0070.05714.65
5.3.140.0070.05314.52
5.3.130.0100.05314.53
5.3.120.0070.06714.73
5.3.110.0030.06014.61
5.3.100.0100.05014.17
5.3.90.0100.05014.13
5.3.80.0100.05314.06
5.3.70.0070.05314.00
5.3.60.0170.04314.07
5.3.50.0070.06013.94
5.3.40.0170.06014.17
5.3.30.0100.04713.93
5.3.20.0100.04713.88
5.3.10.0000.05713.57
5.3.00.0100.04713.86
5.2.170.0170.03011.09
5.2.160.0030.04311.23
5.2.150.0000.04711.01
5.2.140.0170.03311.04
5.2.130.0070.04011.02
5.2.120.0100.03711.15
5.2.110.0030.04311.20
5.2.100.0100.04010.89
5.2.90.0070.04011.05
5.2.80.0100.04010.94
5.2.70.0070.04011.18
5.2.60.0030.04310.91
5.2.50.0070.04011.02
5.2.40.0170.03010.99
5.2.30.0030.05010.87
5.2.20.0100.05010.81
5.2.10.0000.04310.84
5.2.00.0070.03710.62
5.1.60.0070.03010.07
5.1.50.0030.03710.07
5.1.40.0030.0379.98
5.1.30.0030.03710.24
5.1.20.0130.03010.42
5.1.10.0000.04010.11
5.1.00.0030.03710.11
5.0.50.0070.0278.54
5.0.40.0000.0308.25
5.0.30.0000.0478.26
5.0.20.0000.0308.21
5.0.10.0070.0278.16
5.0.00.0030.0438.24
4.4.90.0000.0275.79
4.4.80.0130.0105.74
4.4.70.0000.0235.73
4.4.60.0000.0235.75
4.4.50.0000.0235.91
4.4.40.0000.0375.75
4.4.30.0030.0205.82
4.4.20.0000.0235.83
4.4.10.0070.0175.81
4.4.00.0030.0375.78
4.3.110.0030.0235.70
4.3.100.0100.0235.77
4.3.90.0000.0335.76
4.3.80.0070.0375.77
4.3.70.0000.0235.76
4.3.60.0000.0235.65
4.3.50.0070.0175.73
4.3.40.0030.0335.70
4.3.30.0000.0234.42
4.3.20.0000.0234.50
4.3.10.0000.0304.35
4.3.00.0200.01714.77

preferences:
43.69 ms | 401 KiB | 5 Q