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['date']=$v["count"]; } print_r(array_combine($date,$new)); //foreach($new as $k =>$v){ foreach($date as $k2 =>$v2 ){ if(!array_key_exists($v2,$new)){$new[$k2]=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.0140.00718.56
8.3.50.0120.01022.08
8.3.40.0110.00418.71
8.3.30.0100.00319.26
8.3.20.0050.00320.16
8.3.10.0080.00022.09
8.3.00.0020.00522.43
8.2.180.0040.01218.54
8.2.170.0090.00622.96
8.2.160.0110.00721.07
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00017.63
8.2.110.0030.00619.32
8.2.100.0060.01018.03
8.2.90.0050.00317.88
8.2.80.0050.00517.97
8.2.70.0030.00617.75
8.2.60.0050.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0040.00418.17
8.2.20.0070.00017.85
8.2.10.0040.00417.75
8.2.00.0030.00617.84
8.1.280.0130.01025.92
8.1.270.0080.00022.13
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0100.00020.72
8.1.230.0000.01122.21
8.1.220.0080.00017.77
8.1.210.0000.00818.77
8.1.200.0000.01017.48
8.1.190.0040.00417.66
8.1.180.0060.00318.10
8.1.170.0050.00318.71
8.1.160.0040.00421.88
8.1.150.0070.00018.73
8.1.140.0050.00217.48
8.1.130.0080.00017.76
8.1.120.0030.00517.52
8.1.110.0070.00317.36
8.1.100.0050.00317.46
8.1.90.0000.00717.45
8.1.80.0040.00417.36
8.1.70.0000.00717.42
8.1.60.0000.00917.50
8.1.50.0050.00217.45
8.1.40.0040.00417.52
8.1.30.0000.00817.53
8.1.20.0050.00317.61
8.1.10.0000.00717.45
8.1.00.0060.00317.51
8.0.300.0060.00318.77
8.0.290.0090.00017.18
8.0.280.0000.00718.48
8.0.270.0070.00017.20
8.0.260.0070.00016.89
8.0.250.0000.00716.93
8.0.240.0040.00417.05
8.0.230.0000.00816.91
8.0.220.0000.00717.02
8.0.210.0080.00016.99
8.0.200.0030.00317.00
8.0.190.0000.00717.08
8.0.180.0040.00416.86
8.0.170.0000.00716.93
8.0.160.0030.00417.00
8.0.150.0080.00016.81
8.0.140.0080.00016.94
8.0.130.0000.00513.34
8.0.120.0050.00316.90
8.0.110.0040.00416.83
8.0.100.0000.00716.89
8.0.90.0040.00416.81
8.0.80.0070.01116.97
8.0.70.0050.00216.91
8.0.60.0030.00316.73
8.0.50.0040.00416.77
8.0.30.0090.00917.12
8.0.20.0050.01317.40
8.0.10.0000.00716.90
8.0.00.0110.00916.84
7.4.330.0060.00015.00
7.4.320.0030.00316.66
7.4.300.0040.00416.58
7.4.290.0040.00416.48
7.4.280.0000.00716.46
7.4.270.0090.00016.59
7.4.260.0090.00016.48
7.4.250.0030.00316.55
7.4.240.0040.00316.53
7.4.230.0030.00316.36
7.4.220.0180.00916.55
7.4.210.0080.00916.53
7.4.200.0000.00716.44
7.4.190.0000.00716.50
7.4.160.0130.00416.56
7.4.150.0070.01017.40
7.4.140.0120.00517.86
7.4.130.0120.00716.59
7.4.120.0070.01016.61
7.4.110.0030.01316.43
7.4.100.0100.01016.44
7.4.90.0070.01416.46
7.4.80.0070.01019.39
7.4.70.0040.01216.58
7.4.60.0090.00616.52
7.4.50.0050.00316.48
7.4.40.0030.00922.77
7.4.30.0100.00616.44
7.4.00.0060.01214.81
7.3.330.0000.00513.24
7.3.320.0000.00513.29
7.3.310.0050.00216.28
7.3.300.0040.00416.34
7.3.290.0100.01016.42
7.3.280.0060.01216.37
7.3.270.0110.00517.40
7.3.260.0120.00616.44
7.3.250.0080.00816.54
7.3.240.0070.01016.39
7.3.230.0100.00616.43
7.3.210.0120.00616.57
7.3.200.0130.00419.39
7.3.190.0150.00616.47
7.3.180.0080.00816.43
7.3.170.0130.00616.45
7.3.160.0200.00316.46
7.3.120.0130.00314.61
7.3.110.0080.00814.84
7.3.100.0070.00314.94
7.3.90.0100.00614.89
7.3.80.0030.01014.68
7.3.70.0000.01014.77
7.3.60.0040.00714.71
7.3.50.0060.00314.94
7.3.40.0030.00814.64
7.3.30.0090.00614.93
7.3.20.0030.01016.77
7.3.10.0050.00716.71
7.3.00.0100.00116.57
7.2.330.0030.01516.67
7.2.320.0190.00316.77
7.2.310.0160.01016.72
7.2.300.0040.01216.48
7.2.290.0030.01316.76
7.2.240.0090.00615.33
7.2.230.0040.01115.18
7.2.220.0040.00715.06
7.2.210.0000.01114.98
7.2.200.0070.00715.05
7.2.190.0040.00814.97
7.2.180.0030.00914.79
7.2.170.0000.01115.02
7.2.160.0060.00915.29
7.2.150.0070.00716.83
7.2.140.0130.00717.00
7.2.130.0050.00716.64
7.2.120.0020.01116.84
7.2.110.0050.01016.99
7.2.100.0080.00516.98
7.2.90.0090.00416.99
7.2.80.0050.01216.87
7.2.70.0050.00916.84
7.2.60.0070.00917.09
7.2.50.0030.01216.88
7.2.40.0110.00516.98
7.2.30.0020.01016.99
7.2.20.0070.00716.81
7.2.10.0050.01316.80
7.2.00.0090.00416.79
7.1.330.0000.01515.74
7.1.320.0130.00315.93
7.1.310.0070.00315.62
7.1.300.0040.01115.92
7.1.290.0080.00415.62
7.1.280.0000.01116.02
7.1.270.0100.00315.75
7.1.260.0030.00815.87
7.1.250.0080.00815.66
7.1.70.0040.00416.87
7.1.60.0090.01519.82
7.1.50.0030.02116.85
7.1.00.0030.07722.40
7.0.200.0040.00416.79
7.0.140.0030.07322.09
7.0.60.0030.05319.86
7.0.50.0100.05017.94
7.0.40.0030.04320.09
7.0.30.0470.07320.08
7.0.20.0270.07020.38
7.0.10.0100.06320.07
7.0.00.0030.06020.08
5.6.280.0070.06320.93
5.6.210.0070.07320.50
5.6.200.0100.04018.25
5.6.190.0170.07720.63
5.6.180.0230.05020.51
5.6.170.0330.07720.56
5.6.160.0030.09020.54
5.6.150.0130.08018.14
5.6.140.0100.05318.15
5.6.130.0070.04718.18
5.6.120.0070.07721.04
5.6.110.0070.08321.05
5.6.100.0130.07721.14
5.6.90.0070.08021.05
5.6.80.0100.08020.53
5.6.70.3730.04720.40
5.5.350.0100.05720.33
5.5.340.0130.04318.05
5.5.330.0170.07320.29
5.5.320.0430.06320.34
5.5.310.0170.03720.26
5.5.300.0030.04317.97
5.5.290.0030.04017.93
5.5.280.0070.04320.73
5.5.270.0100.08320.76
5.5.260.0070.08320.65
5.5.250.0100.07320.61
5.5.240.0030.05320.12
5.4.450.0230.05319.34
5.4.440.0100.07719.70
5.4.430.0430.05019.16
5.4.420.0100.05719.33
5.4.410.0230.04719.34
5.4.400.0170.04718.52
5.4.390.0170.05018.61
5.4.380.0300.05318.76
5.4.370.0330.04318.82
5.4.360.0300.05318.61
5.4.350.0200.05018.51
5.4.340.0200.05018.77
5.4.320.0070.04412.50
5.4.310.0050.04412.50
5.4.300.0090.05112.50
5.4.290.0080.03712.50
5.4.280.0070.03712.40
5.4.270.0100.08018.97
5.4.260.0100.07318.93
5.4.250.0130.06018.88
5.4.240.0170.05018.96
5.4.230.0170.07718.96
5.4.220.0000.06319.02
5.4.210.0170.04718.85
5.4.200.0070.05718.96
5.4.190.0100.06318.98
5.4.180.0130.06018.93
5.4.170.0130.05319.17
5.4.160.0100.06018.94
5.4.150.0130.05318.91
5.4.140.0230.04316.39
5.4.130.0100.05016.71
5.4.120.0070.05316.67
5.4.110.0170.06316.52
5.4.100.0100.05316.66
5.4.90.0100.04716.57
5.4.80.0130.05016.59
5.4.70.0130.06316.56
5.4.60.0100.05316.34
5.4.50.0170.05316.48
5.4.40.0100.07316.66
5.4.30.0100.05316.43
5.4.20.0200.05016.49
5.4.10.0200.07016.64
5.4.00.0130.07015.95
5.3.290.0090.04812.80
5.3.280.0130.05314.91
5.3.270.0200.06714.94
5.3.260.0100.06314.80
5.3.250.0200.04714.91
5.3.240.0070.05314.91
5.3.230.0300.06014.88
5.3.220.0270.04014.87
5.3.210.0200.06714.76
5.3.200.0130.05314.71
5.3.190.0170.07014.78
5.3.180.0070.05014.75
5.3.170.0070.07714.85
5.3.160.0130.06714.58
5.3.150.0200.07014.88
5.3.140.0130.06714.80
5.3.130.0270.06714.86
5.3.120.0130.06014.80
5.3.110.0130.06014.63
5.3.100.0300.04014.23
5.3.90.0200.04314.31
5.3.80.0100.05314.08
5.3.70.0200.05314.23
5.3.60.0070.06014.22
5.3.50.0070.05314.02
5.3.40.0200.05014.18
5.3.30.0070.06314.14
5.3.20.0100.07313.76
5.3.10.0130.06713.67
5.3.00.0130.05713.77
5.2.170.0030.04711.21
5.2.160.0100.04311.16
5.2.150.0170.04011.44
5.2.140.0100.04311.04
5.2.130.0170.05311.30
5.2.120.0130.04711.00
5.2.110.0100.04311.35
5.2.100.0170.04311.17
5.2.90.0100.04311.41
5.2.80.0070.06011.23
5.2.70.0070.05011.28
5.2.60.0100.05011.35
5.2.50.0070.05711.22
5.2.40.0170.03311.31
5.2.30.0170.04010.98
5.2.20.0100.03711.27
5.2.10.0170.04711.15
5.2.00.0030.04711.00
5.1.60.0130.04310.07
5.1.50.0070.03710.16
5.1.40.0130.04010.14
5.1.30.0100.04710.65
5.1.20.0070.04010.63
5.1.10.0130.04310.19
5.1.00.0100.05310.39
5.0.50.0000.0378.79
5.0.40.0100.0278.51
5.0.30.0100.0508.54
5.0.20.0100.0308.42
5.0.10.0200.0238.42
5.0.00.0100.0408.42
4.4.90.0070.0278.42
4.4.80.0070.0208.42
4.4.70.0070.0238.42
4.4.60.0070.0238.42
4.4.50.0000.0338.42
4.4.40.0030.0338.42
4.4.30.0030.0238.42
4.4.20.0030.0238.42
4.4.10.0070.0308.42
4.4.00.0030.0378.42
4.3.110.0100.0278.42
4.3.100.0000.0278.42
4.3.90.0130.0238.42
4.3.80.0030.0378.42
4.3.70.0030.0308.42
4.3.60.0130.0208.42
4.3.50.0030.0238.42
4.3.40.0030.0338.42
4.3.30.0030.0238.42
4.3.20.0070.0238.42
4.3.10.0100.0208.42
4.3.00.0000.0237.69

preferences:
47.54 ms | 401 KiB | 5 Q