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($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.0070.01418.45
8.3.50.0140.00722.13
8.3.40.0120.00318.78
8.3.30.0060.00819.25
8.3.20.0000.00720.42
8.3.10.0080.00021.98
8.3.00.0080.00022.35
8.2.180.0100.01316.88
8.2.170.0110.00422.96
8.2.160.0070.00721.07
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.89
8.2.110.0040.00422.07
8.2.100.0060.00617.84
8.2.90.0050.00319.36
8.2.80.0050.00318.03
8.2.70.0000.00917.63
8.2.60.0000.00717.93
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0030.00718.13
8.2.20.0000.00717.77
8.2.10.0030.00519.58
8.2.00.0000.00817.68
8.1.280.0170.00325.92
8.1.270.0070.00022.23
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00024.02
8.1.230.0090.00318.94
8.1.220.0040.00417.91
8.1.210.0000.00918.77
8.1.200.0050.00417.47
8.1.190.0040.00417.53
8.1.180.0050.00318.10
8.1.170.0030.00618.38
8.1.160.0040.00422.02
8.1.150.0040.00418.65
8.1.140.0000.00717.45
8.1.130.0000.00717.84
8.1.120.0000.00717.52
8.1.110.0030.00717.35
8.1.100.0000.00817.45
8.1.90.0040.00417.45
8.1.80.0000.00717.36
8.1.70.0000.00717.51
8.1.60.0040.00417.41
8.1.50.0040.00417.54
8.1.40.0040.00417.55
8.1.30.0000.00717.68
8.1.20.0000.00817.66
8.1.10.0050.00317.60
8.1.00.0080.00017.42
8.0.300.0070.00018.77
8.0.290.0040.00416.93
8.0.280.0030.00318.45
8.0.270.0000.00717.25
8.0.260.0000.00616.94
8.0.250.0040.00417.00
8.0.240.0000.00717.09
8.0.230.0040.00416.93
8.0.220.0030.00317.01
8.0.210.0030.00316.86
8.0.200.0000.00717.12
8.0.190.0000.00716.92
8.0.180.0000.00817.00
8.0.170.0040.00416.89
8.0.160.0000.00716.87
8.0.150.0020.00516.81
8.0.140.0040.00416.91
8.0.130.0000.00613.38
8.0.120.0040.00416.92
8.0.110.0080.00016.93
8.0.100.0070.00016.85
8.0.90.0000.00716.85
8.0.80.0100.01017.01
8.0.70.0040.00416.93
8.0.60.0030.00416.79
8.0.50.0000.00816.84
8.0.30.0160.00617.15
8.0.20.0120.00817.40
8.0.10.0000.00816.97
8.0.00.0100.01016.79
7.4.330.0020.00215.00
7.4.320.0000.00616.57
7.4.300.0030.00316.50
7.4.290.0030.00316.54
7.4.280.0030.00316.54
7.4.270.0070.00016.53
7.4.260.0060.00316.47
7.4.250.0030.00616.52
7.4.240.0030.00416.52
7.4.230.0070.00016.45
7.4.220.0110.00716.63
7.4.210.0060.01016.62
7.4.200.0040.00416.63
7.4.190.0090.00016.39
7.4.160.0080.00816.38
7.4.150.0100.00717.40
7.4.140.0100.00717.86
7.4.130.0130.00816.52
7.4.120.0080.01316.62
7.4.110.0130.01016.62
7.4.100.0110.00616.64
7.4.90.0060.01116.41
7.4.80.0070.01419.39
7.4.70.0120.00916.57
7.4.60.0040.01216.38
7.4.50.0040.00016.39
7.4.40.0000.01622.77
7.4.30.0060.00916.62
7.4.00.0120.00615.20
7.3.330.0000.00813.19
7.3.320.0050.00013.25
7.3.310.0000.00716.23
7.3.300.0000.00716.38
7.3.290.0060.00916.44
7.3.280.0070.00816.42
7.3.270.0100.00717.40
7.3.260.0070.00716.30
7.3.250.0120.01416.38
7.3.240.0090.00916.33
7.3.230.0120.00916.42
7.3.210.0180.00016.48
7.3.200.0060.01119.39
7.3.190.0100.00716.39
7.3.180.0110.00716.31
7.3.170.0080.00816.43
7.3.160.0080.00816.31
7.3.120.0030.01314.82
7.2.330.0120.00616.86
7.2.320.0150.00916.44
7.2.310.0020.00516.54
7.2.300.0160.00016.71
7.2.290.0070.01016.78
7.1.70.0030.00317.06
7.1.60.0100.01019.82
7.1.50.0090.01116.65
7.1.00.0000.08022.29
7.0.200.0000.01816.90
7.0.140.0100.07021.96
7.0.60.0030.04319.96
7.0.50.0200.07317.90
7.0.40.0170.08320.14
7.0.30.0170.04720.09
7.0.20.0400.07320.08
7.0.10.0070.04320.17
7.0.00.0130.03320.20
5.6.280.0130.06721.07
5.6.210.0030.08020.75
5.6.200.0000.05318.18
5.6.190.0070.06720.33
5.6.180.3270.04020.67
5.6.170.0200.04320.50
5.6.160.0200.07020.71
5.6.150.0200.06318.18
5.6.140.0070.08318.18
5.6.130.0130.08018.28
5.6.120.0100.08021.03
5.6.110.0130.04720.98
5.6.100.0100.07321.14
5.6.90.0100.07720.88
5.6.80.0100.05720.49
5.6.70.4430.03720.37
5.5.350.0100.03720.50
5.5.340.0030.07318.03
5.5.330.0000.04720.13
5.5.320.3470.04020.35
5.5.310.0200.06720.41
5.5.300.0000.08317.99
5.5.290.0070.08017.96
5.5.280.0070.08720.78
5.5.270.0230.07020.87
5.5.260.0030.04020.77
5.5.250.0070.03720.78
5.5.240.0370.06320.26
5.4.450.0230.06019.58
5.4.440.0070.06319.38
5.4.430.0030.06719.30
5.4.420.0270.04019.58
5.4.410.0170.05719.35
5.4.400.0230.04718.54
5.4.390.0170.04718.59
5.4.380.0330.05318.82
5.4.370.0200.05318.60
5.4.360.0300.05318.59
5.4.350.0400.04318.59
5.4.340.0230.06018.54
5.4.320.0100.04312.50
5.4.310.0080.04312.50
5.4.300.0070.03612.50
5.4.290.0120.04312.49
5.4.280.0130.03012.39
5.4.270.0100.08019.12
5.4.260.0200.06718.98
5.4.250.0170.07319.08
5.4.240.0130.05319.00
5.4.230.0100.06319.04
5.4.220.0170.06019.14
5.4.210.0070.06719.06
5.4.200.0070.06319.02
5.4.190.0130.05718.91
5.4.180.0200.05718.94
5.4.170.0170.07019.01
5.4.160.0070.07719.24
5.4.150.0000.06019.03
5.4.140.0170.05016.60
5.4.130.0200.04016.66
5.4.120.0130.06316.52
5.4.110.0070.06316.67
5.4.100.0130.06316.65
5.4.90.0100.05316.65
5.4.80.0130.05316.70
5.4.70.0070.06316.65
5.4.60.0100.06716.44
5.4.50.0130.04316.65
5.4.40.0130.04716.56
5.4.30.0100.04716.70
5.4.20.0000.06016.40
5.4.10.0170.07316.55
5.4.00.0070.06716.07
5.3.290.0060.04512.80
5.3.280.0070.05714.78
5.3.270.0130.07314.81
5.3.260.0100.05314.68
5.3.250.0170.05714.68
5.3.240.0100.06014.82
5.3.230.0100.05314.88
5.3.220.0130.05314.84
5.3.210.0170.05314.85
5.3.200.0170.05714.58
5.3.190.0130.06314.58
5.3.180.0230.07014.88
5.3.170.0100.05714.80
5.3.160.0100.07014.84
5.3.150.0100.07314.84
5.3.140.0030.06714.77
5.3.130.0100.06014.85
5.3.120.0100.07314.83
5.3.110.0070.06014.83
5.3.100.0130.04314.35
5.3.90.0200.05014.32
5.3.80.0100.05314.03
5.3.70.0070.05714.08
5.3.60.0100.05314.19
5.3.50.0100.05714.26
5.3.40.0030.06714.02
5.3.30.0130.07013.97
5.3.20.0130.06713.88
5.3.10.0130.05013.93
5.3.00.0130.07013.87
5.2.170.0200.05711.21
5.2.160.0070.04011.28
5.2.150.0100.04311.14
5.2.140.0200.05311.04
5.2.130.0130.03711.39
5.2.120.0070.04011.31
5.2.110.0270.02711.42
5.2.100.0100.05311.29
5.2.90.0200.04711.42
5.2.80.0230.04311.40
5.2.70.0130.05311.28
5.2.60.0230.04011.25
5.2.50.0030.04311.23
5.2.40.0100.05011.23
5.2.30.0130.05011.10
5.2.20.0100.04011.25
5.2.10.0130.04710.87
5.2.00.0130.04010.91
5.1.60.0030.04310.25
5.1.50.0070.04310.11
5.1.40.0070.0339.85
5.1.30.0070.04710.56
5.1.20.0130.04010.65
5.1.10.0130.03310.07
5.1.00.0170.03710.38
5.0.50.0070.0408.79
5.0.40.0100.0338.70
5.0.30.0130.0538.50
5.0.20.0070.0308.36
5.0.10.0070.0408.18
5.0.00.0030.0438.48
4.4.90.0000.0307.72
4.4.80.0070.0237.72
4.4.70.0000.0237.72
4.4.60.0000.0307.72
4.4.50.0070.0237.72
4.4.40.0030.0437.72
4.4.30.0030.0277.72
4.4.20.0030.0307.72
4.4.10.0030.0337.72
4.4.00.0070.0437.72
4.3.110.0100.0237.72
4.3.100.0070.0207.72
4.3.90.0100.0137.72
4.3.80.0030.0337.72
4.3.70.0030.0277.72
4.3.60.0070.0207.72
4.3.50.0000.0277.72
4.3.40.0030.0337.72
4.3.30.0030.0207.72
4.3.20.0030.0307.72
4.3.10.0030.0207.72
4.3.00.0070.0176.60

preferences:
40.3 ms | 401 KiB | 5 Q