3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['city' => 'NewYork', 'cash' => '1000'], ['city' => 'Philadelphia', 'cash' => '2300'], ['city' => 'NewYork', 'cash' => '2000'] ]; var_export( array_reduce( $array, function($result, $row) { static $ref; if (!isset($ref[$row['city']])) { $ref[$row['city']] = $row; $result[] = &$ref[$row['city']]; } else { $ref[$row['city']]['cash'] += $row['cash']; } return $result; } ) );

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.4.120.0130.00720.73
8.4.110.0130.00618.73
8.4.100.0120.00717.68
8.4.90.0120.00920.52
8.4.80.0100.00920.58
8.4.70.0150.00518.86
8.4.60.0090.00720.58
8.4.50.0110.00618.54
8.4.40.0000.00820.37
8.4.30.0030.00520.73
8.4.20.0130.00619.50
8.4.10.0130.00724.04
8.3.250.0090.00818.93
8.3.240.0110.00816.52
8.3.230.0050.00316.54
8.3.220.0100.00718.82
8.3.210.0050.00316.63
8.3.200.0040.00516.23
8.3.190.0020.00517.05
8.3.180.0090.01019.00
8.3.170.0140.00417.39
8.3.160.0070.01116.86
8.3.150.0080.00017.34
8.3.140.0110.00316.31
8.3.130.0030.00518.50
8.3.120.0070.00421.04
8.3.110.0060.00316.63
8.3.100.0100.01016.45
8.3.90.0080.00026.77
8.3.80.0040.00418.56
8.3.70.0070.01416.75
8.3.60.0070.00716.63
8.3.50.0110.00416.45
8.3.40.0150.00420.17
8.3.30.0070.00718.79
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0150.00317.32
8.2.280.0090.00618.40
8.2.270.0110.00716.39
8.2.260.0090.00618.87
8.2.250.0040.00416.64
8.2.240.0000.00919.07
8.2.230.0100.00020.94
8.2.220.0090.00024.06
8.2.210.0030.00526.77
8.2.200.0000.00916.63
8.2.190.0070.01116.88
8.2.180.0150.00625.92
8.2.170.0150.00019.09
8.2.160.0120.00422.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00322.18
8.2.100.0100.00317.78
8.2.90.0090.00017.75
8.2.80.0060.00318.73
8.2.70.0000.00817.75
8.2.60.0000.00817.50
8.2.50.0060.00317.75
8.2.40.0160.00017.62
8.2.30.0130.00417.63
8.2.20.0150.00217.62
8.2.10.0120.00417.62
8.2.00.0130.00317.62
8.1.330.0120.00716.14
8.1.320.0110.00915.98
8.1.310.0070.00718.34
8.1.300.0030.00718.13
8.1.290.0030.00630.84
8.1.280.0060.00925.92
8.1.270.0040.00424.66
8.1.260.0050.00226.35
8.1.250.0030.00628.09
8.1.240.0090.00023.83
8.1.230.0110.00019.12
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0190.00017.62
8.1.160.0110.00717.62
8.1.150.0140.00417.62
8.1.140.0170.00017.62
8.1.130.0130.00617.62
8.1.120.0140.00517.62
8.1.110.0170.00217.62
8.1.100.0170.00017.62
8.1.90.0060.01117.62
8.1.80.0130.00417.62
8.1.70.0090.00917.62
8.1.60.0130.00717.62
8.1.50.0100.00717.62
8.1.40.0150.00217.62
8.1.30.0160.00817.62
8.1.20.0130.00417.62
8.1.10.0090.00917.62
8.1.00.0180.00017.62
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0130.00317.62
8.0.270.0150.00017.62
8.0.260.0110.00517.62
8.0.250.0120.00617.62
8.0.240.0120.00517.62
8.0.230.0100.00717.62
8.0.220.0040.01117.62
8.0.210.0110.00717.62
8.0.200.0150.00217.62
8.0.190.0160.00017.62
8.0.180.0080.00817.62
8.0.170.0130.00317.62
8.0.160.0060.01117.62
8.0.150.0140.00317.62
8.0.140.0100.00717.62
8.0.130.0160.00017.62
8.0.120.0130.00317.62
8.0.110.0110.00517.62
8.0.100.0100.00517.62
8.0.90.0120.00317.62
8.0.80.0080.00817.62
8.0.70.0170.00017.62
8.0.60.0120.00417.62
8.0.50.0070.00917.62
8.0.30.0170.00017.62
8.0.20.0090.00917.62
8.0.10.0130.00317.62

preferences:
27.27 ms | 403 KiB | 5 Q