3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hotel = [ [ 'name' => 'hotel one', 'hotel_price' => '100', 'hotel_child_price' => '50' ], [ 'name' => 'hotel two', 'hotel_price' => '200', 'hotel_child_price' => '100' ], [ 'name' => 'hotel three', 'hotel_price' => '300', 'hotel_child_price' => '200' ], ]; $user_selected_hotel = [ [ 'name' => 'hotel one', 'hotel_price' => '100' ], [ 'name' => 'hotel three', 'hotel_price' => '300' ] ]; var_export( array_sum( array_column( array_uintersect( $hotel, $user_selected_hotel, fn($a, $b) => $a['name'] <=> $b['name'] ), 'hotel_child_price' ) ) );

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.10.0140.00416.70
8.5.00.0140.00820.20
8.4.160.0130.01023.83
8.4.150.0010.00114.05
8.4.140.0140.00717.73
8.4.130.0100.01017.68
8.4.120.0030.00520.57
8.4.110.0140.00618.79
8.4.100.0120.00917.69
8.4.90.0080.01020.35
8.4.80.0040.00420.52
8.4.70.0130.00819.13
8.4.60.0130.00820.38
8.4.50.0120.00718.77
8.4.40.0080.00817.52
8.4.30.0120.00620.44
8.4.20.0050.00318.00
8.4.10.0100.01019.71
8.3.280.0120.00918.31
8.3.270.0090.01116.86
8.3.260.0140.00516.37
8.3.250.0040.00318.88
8.3.240.0120.00916.52
8.3.230.0140.00616.84
8.3.220.0090.01020.86
8.3.210.0090.00616.55
8.3.200.0140.00616.46
8.3.190.0060.00917.20
8.3.180.0120.00718.94
8.3.170.0040.00419.09
8.3.160.0100.00717.17
8.3.150.0110.00720.82
8.3.140.0040.00418.29
8.3.130.0070.00718.28
8.3.120.0060.00316.80
8.3.110.0130.00316.53
8.3.100.0000.01618.54
8.3.90.0000.00819.97
8.3.80.0000.00918.30
8.3.70.0070.01116.50
8.3.60.0090.01216.63
8.3.50.0120.00318.45
8.3.40.0090.00920.37
8.3.30.0100.01021.58
8.3.20.0110.00024.18
8.3.10.0150.00024.66
8.3.00.0120.00626.16
8.2.290.0060.00317.18
8.2.280.0120.00718.43
8.2.270.0000.00817.28
8.2.260.0110.00718.65
8.2.250.0030.00616.64
8.2.240.0050.00319.05
8.2.230.0120.00320.94
8.2.220.0140.00724.06
8.2.210.0030.00626.77
8.2.200.0000.00916.50
8.2.190.0000.01418.41
8.2.180.0140.00416.50
8.2.170.0100.00718.86
8.2.160.0040.01122.96
8.2.150.0100.01025.66
8.2.140.0080.00524.66
8.2.130.0100.01326.16
8.2.120.0000.00721.18
8.2.110.0140.00720.35
8.2.100.0070.00318.97
8.2.90.0170.00918.93
8.2.80.0130.00018.84
8.2.70.0090.00318.80
8.2.60.0040.01118.82
8.2.50.0220.01118.61
8.2.40.0130.00018.82
8.2.30.0070.00318.89
8.2.20.0100.01718.58
8.2.10.0080.00819.20
8.2.00.0210.00718.90
8.1.330.0120.00716.11
8.1.320.0100.00823.59
8.1.310.0070.00318.41
8.1.300.0030.00719.57
8.1.290.0030.00618.88
8.1.280.0110.00425.92
8.1.270.0120.00623.99
8.1.260.0100.01026.35
8.1.250.0090.00628.09
8.1.240.0040.00818.67
8.1.230.0140.00018.69
8.1.220.0170.01418.43
8.1.210.0100.01019.87
8.1.200.0130.01618.55
8.1.190.0130.00018.56
8.1.180.0180.00718.38
8.1.170.0140.00718.69
8.1.160.0070.00718.82
8.1.150.0090.00920.50
8.1.140.0000.01318.34
8.1.130.0070.00318.58
8.1.120.0150.00618.55
8.1.110.0130.01018.62
8.1.100.0030.00718.55
8.1.90.0110.01118.41
8.1.80.0120.00918.54
8.1.70.0150.00618.70
8.1.60.0070.00318.68
8.1.50.0060.00318.59
8.1.40.0100.00718.83
8.1.30.0110.00718.88
8.1.20.0060.00918.71
8.1.10.0220.00018.62
8.1.00.0100.00718.73
8.0.300.0100.00717.93
8.0.290.0000.01017.95
8.0.280.0030.00617.83
8.0.270.0030.00617.70
8.0.260.0040.00417.82
8.0.250.0030.00617.71
8.0.240.0060.00917.75
8.0.230.0090.00018.29
8.0.220.0030.00617.82
8.0.210.0060.00617.68
8.0.200.0070.00718.02
8.0.190.0100.01017.87
8.0.180.0050.00517.84
8.0.170.0080.00317.94
8.0.160.0030.00617.94
8.0.150.0140.00317.88
8.0.140.0100.00317.81
8.0.130.0090.00317.89
8.0.120.0060.00317.88
8.0.110.0030.00717.75
8.0.100.0090.00017.88
8.0.90.0030.00617.83
8.0.80.0090.00017.71
8.0.70.0030.00617.89
8.0.60.0050.00517.75
8.0.50.0030.00617.89
8.0.30.0050.00517.88
8.0.20.0000.01018.01
8.0.10.0050.00518.08

preferences:
94.22 ms | 403 KiB | 5 Q