3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( array("count"=>10,"date"=>"2014-04-16"), array("count"=>50,"date"=>"2014-04-18"), array("count"=>80,"date"=>"2014-04-20") ); $date =array("2014-04-16","2014-04-17","2014-04-18","2014-04-19","2014-04-20"); foreach($arr as $k =>$v ){ //if(!array_key_exists($v['date'],$date)){ // $arr[]=array("count"=>0,"date"=>$date) //} $tt[]=$v['date'];$cc[]=$v['count']; $new[$v['date']]=$v["count"]; }print_r($new); print_r(array_combine($date,$new)); //foreach($new as $k =>$v){ foreach($date as $k2 =>$v2 ){ if(!array_key_exists($v2,$new)){$new[$v2]=0;} }print_r($new); //} foreach($arr as $k2 =>$v2 ){foreach($date as $k =>$v ){ if(!array_key_exists($v,$tt)){ $arr[]=array("count"=>0,"date"=>$v); } } } print_r($arr); //对应$date所有日期转换为 $arr=array( array("count"=>10,"date"=>"2014-04-16"), array("count"=>0,"date"=>"2014-04-17"), array("count"=>50,"date"=>"2014-04-18"), array("count"=>0,"date"=>"2014-04-19"), array("count"=>80,"date"=>"2014-04-20") );

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.0040.01118.55
8.3.50.0100.01021.14
8.3.40.0070.01418.91
8.3.30.0070.00720.17
8.3.20.0080.00020.39
8.3.10.0040.00422.10
8.3.00.0050.00322.29
8.2.180.0070.01116.88
8.2.170.0110.00422.96
8.2.160.0090.00622.12
8.2.150.0030.00624.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0070.00320.91
8.2.110.0030.00622.20
8.2.100.0090.00318.03
8.2.90.0040.00419.06
8.2.80.0040.00419.39
8.2.70.0040.00417.75
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0000.00817.97
8.2.30.0030.00618.04
8.2.20.0000.00717.66
8.2.10.0000.00817.84
8.2.00.0090.00017.68
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.92
8.1.230.0110.00019.16
8.1.220.0040.00417.80
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0000.00817.54
8.1.180.0070.00419.14
8.1.170.0080.00018.56
8.1.160.0040.00418.87
8.1.150.0040.00418.54
8.1.140.0080.00017.40
8.1.130.0000.00817.70
8.1.120.0040.00417.47
8.1.110.0040.00417.45
8.1.100.0040.00417.38
8.1.90.0070.00017.46
8.1.80.0040.00417.43
8.1.70.0000.00717.36
8.1.60.0000.00917.53
8.1.50.0000.00717.48
8.1.40.0050.00317.40
8.1.30.0000.00717.62
8.1.20.0040.00417.70
8.1.10.0030.00517.59
8.1.00.0030.00517.49
8.0.300.0000.00818.77
8.0.290.0000.00817.16
8.0.280.0070.00018.30
8.0.270.0030.00317.27
8.0.260.0070.00016.81
8.0.250.0080.00017.01
8.0.240.0080.00016.95
8.0.230.0000.00717.00
8.0.220.0030.00316.98
8.0.210.0030.00316.92
8.0.200.0000.00716.88
8.0.190.0080.00017.03
8.0.180.0050.00316.87
8.0.170.0040.00417.02
8.0.160.0040.00416.89
8.0.150.0000.00716.96
8.0.140.0070.00016.80
8.0.130.0030.00313.39
8.0.120.0000.00716.81
8.0.110.0000.00716.92
8.0.100.0040.00416.89
8.0.90.0040.00416.91
8.0.80.0140.00716.91
8.0.70.0000.00717.01
8.0.60.0000.00717.02
8.0.50.0050.00216.84
8.0.30.0110.00817.21
8.0.20.0090.01017.40
8.0.10.0040.00417.18
8.0.00.0100.00716.65
7.4.330.0080.00015.00
7.4.320.0040.00416.65
7.4.300.0000.00616.43
7.4.290.0100.00016.56
7.4.280.0050.00316.49
7.4.270.0000.00616.66
7.4.260.0070.00013.22
7.4.250.0050.00316.54
7.4.240.0000.00716.55
7.4.230.0050.00216.48
7.4.220.0090.00916.71
7.4.210.0040.01416.60
7.4.200.0030.00316.57
7.4.190.0040.00416.69
7.4.160.0080.00816.68
7.4.150.0130.00517.40
7.4.140.0150.00517.86
7.4.130.0060.01116.52
7.4.120.0100.01016.56
7.4.110.0160.00616.47
7.4.100.0060.01416.64
7.4.90.0090.00916.67
7.4.80.0090.01119.39
7.4.70.0110.00516.47
7.4.60.0070.01016.46
7.4.50.0000.00616.43
7.4.40.0050.00822.77
7.4.30.0140.01116.32
7.4.00.0060.00815.17
7.3.330.0000.00513.33
7.3.320.0000.00513.23
7.3.310.0030.00316.54
7.3.300.0070.00016.39
7.3.290.0130.00316.35
7.3.280.0060.01116.41
7.3.270.0210.00017.40
7.3.260.0140.01016.48
7.3.250.0010.01616.51
7.3.240.0080.01416.51
7.3.230.0080.01216.63
7.3.210.0100.00616.43
7.3.200.0030.01319.39
7.3.190.0140.00616.58
7.3.180.0090.00616.50
7.3.170.0090.01316.44
7.3.160.0060.00916.32
7.3.120.0050.01314.85
7.3.110.0060.01215.19
7.3.100.0070.00715.05
7.3.90.0060.00914.99
7.3.80.0030.01214.92
7.3.70.0030.00914.89
7.3.60.0060.00614.91
7.3.50.0060.00615.00
7.3.40.0080.00814.83
7.3.30.0060.00615.00
7.3.20.0030.01016.64
7.3.10.0100.00516.52
7.3.00.0110.00716.62
7.2.330.0100.00716.61
7.2.320.0180.00016.69
7.2.310.0090.00916.68
7.2.300.0000.01716.44
7.2.290.0120.00916.76
7.2.250.0090.00915.10
7.2.240.0090.00915.04
7.2.230.0030.01315.04
7.2.220.0060.01314.96
7.2.210.0120.00014.96
7.2.200.0080.00415.20
7.2.190.0030.01015.11
7.2.180.0080.00415.08
7.2.170.0030.00715.29
7.2.130.0080.00916.59
7.2.120.0140.00716.71
7.2.110.0100.01016.82
7.2.100.0050.01016.58
7.2.90.0110.00516.54
7.2.80.0070.00916.80
7.2.70.0100.00516.83
7.2.60.0060.00816.60
7.2.50.0110.00316.70
7.2.40.0100.00616.53
7.2.30.0100.01016.78
7.2.20.0140.00316.63
7.2.10.0110.00616.71
7.2.00.0070.00917.69
7.1.330.0090.00615.97
7.1.320.0130.00015.73
7.1.310.0000.01615.66
7.1.300.0030.00715.65
7.1.290.0000.01416.00
7.1.280.0070.00315.92
7.1.270.0030.01415.80
7.1.260.0090.00315.66
7.1.250.0120.00815.62
7.1.100.0030.00718.02
7.1.70.0040.00417.19
7.1.60.0190.00619.32
7.1.50.0030.01017.04
7.1.00.0000.03722.48
7.0.200.0030.00616.79
7.0.140.0030.07321.95
7.0.80.0100.07720.03
7.0.70.0000.08319.94
7.0.60.0070.08019.93
7.0.50.0230.08720.32
7.0.40.0170.04020.05
7.0.30.0130.06720.10
7.0.20.0100.04020.08
7.0.10.0230.06020.04
7.0.00.0170.06720.10
5.6.280.0070.07321.02
5.6.230.0100.08020.68
5.6.220.0130.08020.50
5.6.210.0030.08020.75
5.6.200.0000.08721.12
5.6.190.0170.07721.09
5.6.180.0130.08021.08
5.6.170.0070.07721.02
5.6.160.0130.06721.04
5.6.150.0000.05320.94
5.6.140.0070.08320.99
5.6.130.0100.09321.10
5.6.120.0100.08721.10
5.6.110.0030.06021.09
5.6.100.0070.07721.04
5.6.90.0130.09020.94
5.6.80.0100.08320.46
5.6.70.0070.05720.40
5.6.60.0070.05720.48
5.6.50.0100.05720.46
5.6.40.0070.05720.44
5.6.30.0030.05320.38
5.6.20.0070.08320.36
5.6.10.0070.06320.49
5.6.00.0130.05020.48
5.5.370.0100.08720.50
5.5.360.0070.08720.56
5.5.350.0130.08320.39
5.5.340.0070.04020.76
5.5.330.0130.08020.89
5.5.320.0070.06320.84
5.5.310.0070.07320.78
5.5.300.0230.07020.86
5.5.290.0100.09020.89
5.5.280.0170.07720.83
5.5.270.0030.09320.86
5.5.260.0070.07320.90
5.5.250.0130.07020.70
5.5.240.0100.04320.28
5.5.230.0070.04720.29
5.5.220.0130.04320.20
5.5.210.0000.07720.23
5.5.200.0070.08020.09
5.5.190.0100.06320.16
5.5.180.0100.05320.27
5.5.160.0100.05020.22
5.5.150.0030.06020.15
5.5.140.0170.05320.25
5.5.130.0070.03720.20
5.5.120.0130.04020.07
5.5.110.0100.06320.23
5.5.100.0070.08020.09
5.5.90.0170.06320.07
5.5.80.0100.07319.98
5.5.70.0100.04320.06
5.5.60.0200.03320.16
5.5.50.0170.03720.00
5.5.40.0130.07720.00
5.5.30.0130.06020.14
5.5.20.0130.07320.06
5.5.10.0030.08020.06
5.5.00.0070.07720.02
5.4.450.0070.05319.47
5.4.440.0100.07719.45
5.4.430.0070.05019.48
5.4.420.0100.08019.36
5.4.410.0170.07319.42
5.4.400.0170.06719.04
5.4.390.0130.05318.85
5.4.380.0200.06019.04
5.4.370.0030.07019.07
5.4.360.0030.06019.09
5.4.350.0000.04719.23
5.4.340.0030.07019.13
5.4.320.0030.04718.85
5.4.310.0070.05719.04
5.4.300.0070.03719.04
5.4.290.0030.04319.00
5.4.280.0070.04318.90
5.4.270.0030.05019.12
5.4.260.0170.03719.16
5.4.250.0070.05718.89
5.4.240.0070.06318.93
5.4.230.0170.03318.89
5.4.220.0130.06019.08
5.4.210.0030.04019.23
5.4.200.0070.07019.13
5.4.190.0100.05318.93
5.4.180.0130.07018.93
5.4.170.0030.08019.19
5.4.160.0130.06019.20
5.4.150.0030.06318.88
5.4.140.0030.07016.33
5.4.130.0030.05316.33
5.4.120.0030.04716.34
5.4.110.0070.07716.39
5.4.100.0030.06316.50
5.4.90.0070.07716.36
5.4.80.0030.04016.48
5.4.70.0030.03716.46
5.4.60.0030.03716.31
5.4.50.0030.03716.44
5.4.40.0170.06016.30
5.4.30.0000.03716.27
5.4.20.0100.03316.45
5.4.10.0000.04716.45
5.4.00.0000.04015.66
5.3.290.0070.07014.61
5.3.280.0100.05314.68
5.3.270.0100.07714.72
5.3.260.0100.05014.77
5.3.250.0100.06014.76
5.3.240.0170.05314.63
5.3.230.0130.03314.68
5.3.220.0070.06014.52
5.3.210.0030.04314.51
5.3.200.0100.06714.68
5.3.190.0070.06014.51
5.3.180.0100.07014.59
5.3.170.0030.05314.52
5.3.160.0030.03714.64
5.3.150.0100.03314.69
5.3.140.0070.07714.57
5.3.130.0070.03714.55
5.3.120.0030.03714.54
5.3.110.0000.04714.52
5.3.100.0130.03014.12
5.3.90.0070.03014.07
5.3.80.0030.04014.05
5.3.70.0030.03314.01
5.3.60.0000.04314.11
5.3.50.0000.03313.95
5.3.40.0070.03313.94
5.3.30.0030.03713.98
5.3.20.0030.03713.65
5.3.10.0030.03013.79
5.3.00.0030.03313.71
5.2.170.0070.02711.84
5.2.160.0000.03011.84
5.2.150.0030.03311.84
5.2.140.0070.02711.84
5.2.130.0030.02711.84
5.2.120.0000.03011.84
5.2.110.0030.03011.84
5.2.100.0000.06711.84
5.2.90.0030.06311.84
5.2.80.0030.04311.84
5.2.70.0070.02711.84
5.2.60.0100.05311.84
5.2.50.0070.05311.84
5.2.40.0070.03311.84
5.2.30.0030.03011.84
5.2.20.0030.02711.84
5.2.10.0070.02311.84
5.2.00.0030.03011.84
5.1.60.0070.02011.84
5.1.50.0070.02311.84
5.1.40.0070.04011.84
5.1.30.0070.02311.84
5.1.20.0030.02311.84
5.1.10.0100.02011.84
5.1.00.0030.02311.84
5.0.50.0030.01711.84
5.0.40.0000.02011.84
5.0.30.0070.02711.84
5.0.20.0000.02011.84
5.0.10.0030.01711.84
5.0.00.0030.03011.84
4.4.90.0030.03311.84
4.4.80.0000.02711.84
4.4.70.0030.01311.84
4.4.60.0030.01711.84
4.4.50.0000.02311.84
4.4.40.0000.02311.84
4.4.30.0000.01711.84
4.4.20.0000.01311.84
4.4.10.0000.01311.84
4.4.00.0000.02711.84
4.3.110.0030.01311.84
4.3.100.0030.01311.84
4.3.90.0000.01711.84
4.3.80.0000.02011.84
4.3.70.0000.01711.84
4.3.60.0070.00711.84
4.3.50.0000.01711.84
4.3.40.0030.02311.84
4.3.30.0000.01711.84
4.3.20.0000.02311.84
4.3.10.0030.01311.84
4.3.00.0000.01311.84

preferences:
39.52 ms | 401 KiB | 5 Q