3v4l.org

run code in 300+ PHP versions simultaneously
<?php $args = [ 'a' => [ 'zebra' => 1, ], 'b' => [ 'zebra' => 0, ], 'c' => [ 'zebra' => 1, ], 'd' => [ 'zebra' => 1, ], 'e' => [ 'zebra' => 1, ], ]; $args0 = array_filter($args, function ($arg) { return $arg['zebra'] === 0; }); $args1 = array_filter($args, function ($arg) { return $arg['zebra'] === 1; }); $result = array_merge(...array_map(static function ($arg0Key, $arg1Key) use ($args0, $args1) { if ($arg0Key !== null) { $result[$arg0Key] = $args0[$arg0Key]; } if ($arg1Key !== null) { $result[$arg1Key] = $args1[$arg1Key]; } return $result; }, array_keys($args0), array_keys($args1))); print_r($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.5.10.0060.01219.10
8.5.00.0130.00820.09
8.4.160.0140.00922.98
8.4.150.0020.00114.05
8.4.140.0100.01417.75
8.4.130.0060.00617.82
8.4.120.0130.00820.65
8.4.110.0100.00622.51
8.4.100.0120.00918.80
8.4.90.0050.00518.90
8.4.80.0130.00619.54
8.4.70.0090.00918.00
8.4.60.0140.00918.82
8.4.50.0120.00922.32
8.4.40.0130.00619.50
8.4.30.0000.00820.32
8.4.20.0100.01020.53
8.4.10.0050.00517.91
8.3.290.0120.01020.77
8.3.280.0110.01118.33
8.3.270.0090.01016.64
8.3.260.0100.00916.61
8.3.250.0130.00718.77
8.3.240.0130.00718.45
8.3.230.0090.00816.49
8.3.220.0050.00317.35
8.3.210.0110.00816.66
8.3.200.0040.00516.70
8.3.190.0110.00917.05
8.3.180.0100.00918.59
8.3.170.0160.00016.58
8.3.160.0100.00717.00
8.3.150.0080.00017.22
8.3.140.0140.00320.63
8.3.130.0060.00316.76
8.3.120.0150.00420.39
8.3.110.0030.00620.94
8.3.100.0100.00018.46
8.3.90.0060.00326.77
8.3.80.0090.00019.36
8.3.70.0030.01418.43
8.3.60.0110.00718.18
8.3.50.0070.00923.77
8.3.40.0040.01218.63
8.3.30.0060.01318.56
8.3.20.0040.00420.75
8.3.10.0050.00321.93
8.3.00.0070.00023.70
8.2.300.0140.00920.54
8.2.290.0080.01120.23
8.2.280.0100.00918.50
8.2.270.0090.00918.25
8.2.260.0150.00316.35
8.2.250.0000.00717.02
8.2.240.0110.00018.84
8.2.230.0050.00322.58
8.2.220.0040.00424.06
8.2.210.0030.00526.77
8.2.200.0040.00418.88
8.2.190.0100.00718.16
8.2.180.0070.01116.37
8.2.170.0140.00022.96
8.2.160.0070.00720.39
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00526.16
8.2.120.0000.00819.36
8.2.110.0040.00820.86
8.2.100.0110.00017.91
8.2.90.0040.00419.95
8.2.80.0080.00020.54
8.2.70.0060.00317.93
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0030.00619.38
8.2.30.0000.00819.21
8.2.20.0070.00018.20
8.2.10.0000.00719.33
8.2.00.0070.00019.33
8.1.330.0090.00822.14
8.1.320.0140.00616.41
8.1.310.0120.00618.63
8.1.300.0120.00319.46
8.1.290.0030.00630.84
8.1.280.0030.01225.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00522.14
8.1.230.0040.00820.83
8.1.220.0000.00817.79
8.1.210.0040.00419.02
8.1.200.0080.00417.36
8.1.190.0050.00317.00
8.1.180.0040.00418.87
8.1.170.0080.00018.59
8.1.160.0030.00519.14
8.1.150.0000.00819.15
8.1.140.0070.00020.79
8.1.130.0030.00320.28
8.1.120.0000.00817.51
8.1.110.0040.00417.41
8.1.100.0060.00317.47
8.1.90.0000.00717.47
8.1.80.0050.00317.41
8.1.70.0000.00717.53
8.1.60.0030.00617.54
8.1.50.0030.00517.49
8.1.40.0030.00517.61
8.1.30.0040.00417.67
8.1.20.0090.00017.73
8.1.10.0070.00017.57
8.1.00.0050.00317.50
8.0.300.0040.00420.04
8.0.290.0000.00716.63
8.0.280.0000.00718.52
8.0.270.0030.00316.84
8.0.260.0030.00320.09
8.0.250.0070.00017.02
8.0.240.0040.00416.97
8.0.230.0000.00716.99
8.0.220.0000.00716.82
8.0.210.0000.00716.80
8.0.200.0060.00016.98
8.0.190.0000.00817.00
8.0.180.0000.00816.82
8.0.170.0070.00416.82
8.0.160.0000.00816.95
8.0.150.0000.00716.84
8.0.140.0000.00816.75
8.0.130.0000.00613.30
8.0.120.0040.00416.74
8.0.110.0040.00416.82
8.0.100.0040.00416.72
8.0.90.0060.00316.90
8.0.80.0120.00316.91
8.0.70.0070.00016.95
8.0.60.0000.00816.79
8.0.50.0050.00216.89
8.0.30.0090.00916.96
8.0.20.0030.01717.22
8.0.10.0060.00317.09
8.0.00.0160.00916.82
7.4.330.0030.00316.75
7.4.320.0000.00716.63
7.4.300.0030.00316.59
7.4.290.0000.00716.52
7.4.280.0030.00516.62
7.4.270.0060.00316.50
7.4.260.0000.00513.29
7.4.250.0030.00316.46
7.4.240.0030.00416.54
7.4.230.0000.00716.43
7.4.220.0040.00416.67
7.4.210.0090.00616.63
7.4.200.0040.00416.52
7.4.130.0060.01616.51
7.4.120.0110.01416.48
7.4.110.0140.00316.38
7.4.100.0120.01016.61
7.4.90.0120.00616.43
7.4.80.0100.01319.39
7.4.70.0030.01316.63
7.4.60.0030.01416.59
7.4.50.0040.01116.40
7.4.40.0090.00916.53
7.4.10.0000.01716.25
7.4.00.0160.00016.54
7.3.330.0000.00716.26
7.3.320.0050.00013.39
7.3.310.0030.00316.31
7.3.300.0000.00716.33
7.3.290.0070.00716.38
7.3.280.0100.01016.32
7.3.260.0100.00716.74
7.3.240.0080.01016.63
7.3.230.0130.00316.35
7.3.210.0120.00416.62
7.3.200.0110.01016.39
7.3.190.0100.01016.51
7.3.180.0060.01416.42
7.3.170.0140.00316.55
7.3.160.0060.01016.27
7.3.130.0090.00916.49
7.3.120.0110.00516.39
7.3.110.0120.00916.57
7.3.100.0110.01016.62
7.3.90.0120.00916.43
7.3.80.0040.01216.29
7.3.70.0140.00716.38
7.3.60.0060.00916.50
7.3.50.0000.01516.29
7.3.40.0070.01116.20
7.3.30.0100.01016.50
7.3.20.0100.00616.39
7.3.10.0090.01216.29
7.3.00.0130.00616.47
7.2.330.0060.01516.37
7.2.320.0090.00916.54
7.2.310.0090.00916.72
7.2.300.0110.00716.57
7.2.290.0060.01716.49
7.2.260.0110.00616.59
7.2.250.0090.00816.55
7.2.240.0070.01316.66
7.2.230.0140.00316.57
7.2.220.0090.00916.60
7.2.210.0100.00616.80
7.2.200.0100.00716.62
7.2.190.0120.00316.66
7.2.180.0000.01616.46
7.2.170.0040.01416.55
7.2.160.0060.01216.56
7.2.150.0110.00716.64
7.2.140.0160.01016.85
7.2.130.0060.01216.60
7.2.120.0120.00616.55
7.2.110.0130.00316.59
7.2.100.0180.00916.63
7.2.90.0110.00716.57
7.2.80.0030.01316.68
7.2.70.0100.00716.52
7.2.60.0000.01616.70
7.2.50.0060.00916.56
7.2.40.0040.01216.76
7.2.30.0060.00916.59
7.2.20.0110.00616.64
7.2.10.0110.00616.55
7.2.00.0060.01216.53

preferences:
162.15 ms | 403 KiB | 5 Q