3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = '{"data":"key=IAfpK, age=58, key=WNVdi, age=64, key=jp9zt, age=47"}'; preg_match_all('/(?:age=)([0-9]+)/', json_decode($data)->data, $matches, PREG_PATTERN_ORDER); if (array_key_exists(1, $matches)) { $greaterThan50 = array_filter($matches[1], function($age) { return intval($age) > 50; }); var_dump($greaterThan50); }

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.70.0110.00216.97
8.5.60.0070.01116.81
8.5.50.0100.00716.89
8.5.30.0120.00619.49
8.5.20.0070.00919.40
8.5.10.0110.00719.99
8.5.00.0060.00420.21
8.4.210.0130.00821.61
8.4.180.0080.00223.78
8.4.170.0090.01222.09
8.4.160.0100.01423.95
8.4.150.0070.00617.79
8.4.140.0150.00618.00
8.4.130.0130.00819.55
8.4.120.0130.00722.39
8.4.110.0120.00822.27
8.4.100.0130.00718.70
8.4.90.0060.00320.62
8.4.80.0120.00718.91
8.4.70.0060.00918.16
8.4.60.0140.00718.75
8.4.50.0060.00318.57
8.4.40.0070.01119.86
8.4.30.0130.00618.90
8.4.20.0160.00324.16
8.4.10.0060.00323.82
8.3.300.0100.01220.77
8.3.290.0120.00921.00
8.3.280.0110.00820.83
8.3.270.0120.00716.67
8.3.260.0150.00516.55
8.3.250.0050.00518.93
8.3.240.0070.01317.27
8.3.230.0080.01216.73
8.3.220.0050.00419.04
8.3.210.0150.00316.64
8.3.200.0110.01016.78
8.3.190.0140.00516.97
8.3.180.0090.01017.01
8.3.170.0100.01018.88
8.3.160.0140.00417.18
8.3.150.0190.00017.32
8.3.140.0110.00718.37
8.3.130.0090.00017.00
8.3.120.0090.00919.11
8.3.110.0060.00316.69
8.3.100.0060.00316.88
8.3.90.0110.00826.77
8.3.80.0030.00619.36
8.3.70.0130.00917.13
8.3.60.0180.00316.88
8.3.50.0090.00918.78
8.3.40.0040.01120.00
8.3.30.0070.00718.79
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0140.00718.33
8.2.290.0080.00620.72
8.2.280.0060.01220.57
8.2.270.0040.01519.03
8.2.260.0100.01016.57
8.2.250.0040.01116.66
8.2.240.0000.01018.46
8.2.230.0060.00320.94
8.2.220.0060.00324.06
8.2.210.0060.01226.77
8.2.200.0040.00418.88
8.2.190.0120.01216.58
8.2.180.0080.01116.88
8.2.170.0160.00619.16
8.2.160.0030.01222.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00021.17
8.2.110.0050.00522.24
8.2.100.0110.00017.97
8.2.90.0050.00317.88
8.2.80.0000.00818.86
8.2.70.0050.00317.88
8.2.60.0050.00317.88
8.2.50.0080.00017.75
8.2.40.0070.00319.60
8.2.30.0060.00318.00
8.2.20.0040.00419.23
8.2.10.0000.00818.16
8.2.00.0090.00019.68
8.1.340.0120.00917.90
8.1.330.0130.00623.80
8.1.320.0130.00716.36
8.1.310.0070.00316.94
8.1.300.0030.00620.06
8.1.290.0000.00930.84
8.1.280.0130.00725.92
8.1.270.0090.00024.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0080.00320.50
8.1.230.0070.00417.83
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00917.62
8.1.160.0000.00720.76
8.1.150.0030.00518.68
8.1.140.0080.00017.61
8.1.130.0000.00819.48
8.1.120.0040.00419.44
8.1.110.0080.00019.45
8.1.100.0080.00019.31
8.1.90.0030.00519.37
8.1.80.0040.00419.36
8.1.70.0040.00419.36
8.1.60.0040.00419.54
8.1.50.0050.00519.50
8.1.40.0030.00519.50
8.1.30.0040.00419.64
8.1.20.0080.00319.50
8.1.10.0100.00019.52
8.1.00.0060.00319.45
8.0.300.0020.00518.77
8.0.290.0030.00516.75
8.0.280.0030.00418.16
8.0.270.0000.00718.16
8.0.260.0060.00318.74
8.0.250.0040.00418.77
8.0.240.0080.00018.88
8.0.230.0050.00518.86
8.0.220.0040.00418.74
8.0.210.0080.00018.63
8.0.200.0000.00818.67
8.0.190.0030.00518.86
8.0.180.0040.00418.89
8.0.170.0050.00518.78
8.0.160.0080.00018.74
8.0.150.0090.00018.75
8.0.140.0000.00817.13
8.0.130.0000.00817.13
8.0.120.0030.00517.13
8.0.110.0030.00617.13
8.0.100.0000.00817.13
8.0.90.0070.00317.13
8.0.80.0000.00717.13
8.0.70.0050.00317.13
8.0.60.0050.00317.13
8.0.50.0000.00817.13
8.0.30.0000.00817.13
8.0.20.0040.00417.13
8.0.10.0090.00017.13

preferences:
59.27 ms | 1122 KiB | 5 Q