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[$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.40.0060.00918.98
8.3.30.0100.00319.30
8.3.20.0040.00420.33
8.3.10.0080.00021.95
8.3.00.0040.00422.34
8.2.170.0070.00722.96
8.2.160.0100.00720.95
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0090.00019.19
8.2.110.0060.00322.31
8.2.100.0000.01219.63
8.2.90.0040.00419.05
8.2.80.0060.00319.66
8.2.70.0000.00817.63
8.2.60.0000.00818.02
8.2.50.0050.00318.07
8.2.40.0030.00518.03
8.2.30.0030.00618.13
8.2.20.0050.00317.78
8.2.10.0000.00717.86
8.2.00.0040.00417.87
8.1.270.0000.00821.94
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0030.00623.87
8.1.230.0090.00319.15
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0060.00317.51
8.1.180.0040.00418.10
8.1.170.0050.00318.43
8.1.160.0000.00722.03
8.1.150.0040.00418.64
8.1.140.0000.00717.45
8.1.130.0080.00017.74
8.1.120.0040.00417.49
8.1.110.0040.00417.46
8.1.100.0000.00817.48
8.1.90.0040.00417.43
8.1.80.0030.00517.36
8.1.70.0030.00317.43
8.1.60.0050.00317.58
8.1.50.0070.00017.53
8.1.40.0000.00717.43
8.1.30.0050.00317.49
8.1.20.0040.00417.61
8.1.10.0050.00317.57
8.1.00.0070.00017.47
8.0.300.0040.00418.77
8.0.290.0040.00416.93
8.0.280.0070.00018.34
8.0.270.0070.00017.24
8.0.260.0030.00316.92
8.0.250.0000.00716.89
8.0.240.0040.00416.93
8.0.230.0000.00716.92
8.0.220.0030.00316.95
8.0.210.0000.00716.98
8.0.200.0000.00716.98
8.0.190.0000.00816.98
8.0.180.0040.00416.89
8.0.170.0060.00316.87
8.0.160.0040.00416.93
8.0.150.0000.00716.93
8.0.140.0030.00616.78
8.0.130.0030.00313.38
8.0.120.0040.00416.96
8.0.110.0050.00516.95
8.0.100.0040.00416.84
8.0.90.0070.00016.97
8.0.80.0060.00917.01
8.0.70.0000.00716.99
8.0.60.0040.00416.94
8.0.50.0050.00216.75
8.0.30.0090.01117.11
8.0.20.0090.01017.40
8.0.10.0040.00416.95
8.0.00.0120.00916.93
7.4.330.0050.00015.00
7.4.320.0000.00616.61
7.4.300.0030.00316.48
7.4.290.0050.00216.45
7.4.280.0040.00416.57
7.4.270.0000.00716.41
7.4.260.0050.00216.48
7.4.250.0000.00716.43
7.4.240.0030.00416.54
7.4.230.0040.00416.31
7.4.220.0030.01416.71
7.4.210.0100.00516.48
7.4.200.0000.00716.55
7.4.190.0070.00016.61
7.4.160.0060.01016.48
7.4.150.0110.00617.40
7.4.140.0050.01417.86
7.4.130.0070.01116.53
7.4.120.0100.00816.63
7.4.110.0180.00316.68
7.4.100.0130.00316.67
7.4.90.0090.00916.57
7.4.80.0150.00319.39
7.4.70.0030.01416.50
7.4.60.0100.00616.54
7.4.50.0080.00016.69
7.4.40.0000.01522.77
7.4.30.0110.00716.51
7.4.00.0050.00815.17
7.3.330.0060.00013.32
7.3.320.0030.00313.33
7.3.310.0000.00716.22
7.3.300.0000.00616.44
7.3.290.0100.00716.36
7.3.280.0120.00516.38
7.3.270.0070.01017.40
7.3.260.0160.00016.34
7.3.250.0080.01016.45
7.3.240.0090.01216.38
7.3.230.0030.01716.43
7.3.210.0100.00716.68
7.3.200.0100.01319.39
7.3.190.0140.00416.59
7.3.180.0110.00416.51
7.3.170.0190.00316.47
7.3.160.0120.00916.38
7.3.120.0070.00914.96
7.3.110.0040.01114.66
7.3.100.0100.00714.86
7.3.90.0090.00314.73
7.3.80.0040.01114.98
7.3.70.0120.00014.86
7.3.60.0090.00314.93
7.3.50.0080.00814.93
7.3.40.0030.00914.91
7.3.30.0000.01414.96
7.3.20.0040.01116.41
7.3.10.0070.00716.80
7.3.00.0070.00716.66
7.2.330.0140.00316.45
7.2.320.0120.00616.47
7.2.310.0120.00616.56
7.2.300.0120.00416.50
7.2.290.0130.00416.54
7.2.250.0070.01114.91
7.2.240.0030.01715.11
7.2.230.0060.01014.89
7.2.220.0100.00315.31
7.2.210.0040.00815.00
7.2.200.0060.01014.91
7.2.190.0060.00614.96
7.2.180.0090.00314.89
7.2.170.0070.00715.16
7.2.00.0040.00819.32
7.1.330.0100.00316.04
7.1.320.0040.00915.77
7.1.310.0040.01115.61
7.1.300.0030.01415.80
7.1.290.0070.00715.96
7.1.280.0000.01515.88
7.1.270.0040.00415.73
7.1.260.0040.00815.84
7.1.70.0050.00317.28
7.1.60.0030.01317.22
7.1.50.0170.01734.82
7.1.00.0000.08022.46
7.0.200.0150.00416.88
7.0.140.0170.06322.00
7.0.60.0000.07319.97
7.0.50.0070.04017.86
7.0.40.0130.07320.13
7.0.30.0400.04720.08
7.0.20.0270.08020.05
7.0.10.0030.06720.23
7.0.00.0000.05720.08
5.6.280.0070.07321.08
5.6.210.0100.08720.70
5.6.200.0330.03718.27
5.6.190.0100.08020.45
5.6.180.0370.05720.33
5.6.170.0300.06020.50
5.6.160.0070.07020.61
5.6.150.0070.08718.23
5.6.140.0070.07018.18
5.6.130.0130.07018.14
5.6.120.0170.07320.88
5.6.110.0070.08720.99
5.6.100.0070.07021.13
5.6.90.0100.07720.99
5.6.80.0030.05020.29
5.5.350.0230.08020.44
5.5.340.0030.08317.98
5.5.330.0030.05020.34
5.5.320.0330.05320.34
5.5.310.0330.06720.34
5.5.300.0070.04718.08
5.5.290.0070.05717.97
5.5.280.0100.07320.77
5.5.270.0030.06320.78
5.5.260.0130.08020.76
5.5.250.0070.08320.69
5.5.240.0200.07320.15
5.4.450.0230.05019.40
5.4.440.0670.04319.27
5.4.430.0300.04319.27
5.4.420.0270.04719.16
5.4.410.0870.03019.27
5.4.400.0830.04719.22
5.4.390.0870.05019.22
5.4.380.0200.07018.78
5.4.370.0300.05318.51
5.4.360.0430.03718.51
5.4.350.0400.05018.52
5.4.340.0530.05718.73
5.4.320.0110.03412.50
5.4.310.0140.04012.50
5.4.300.0100.04412.50
5.4.290.0050.04012.50
5.4.280.0090.03912.39
5.4.270.0200.05718.91
5.4.260.0130.05318.94
5.4.250.0130.06318.91
5.4.240.0130.06319.13
5.4.230.0170.05318.82
5.4.220.0070.05718.97
5.4.210.0130.05019.16
5.4.200.0170.08019.13
5.4.190.0130.06718.98
5.4.180.0230.05318.80
5.4.170.0070.07018.89
5.4.160.0130.05318.82
5.4.150.0030.07018.82
5.4.140.0170.05316.64
5.4.130.0130.04716.56
5.4.120.0130.05716.65
5.4.110.0100.05016.63
5.4.100.0100.05016.56
5.4.90.0070.05716.65
5.4.80.0200.06716.56
5.4.70.0230.04316.61
5.4.60.0130.06716.63
5.4.50.0130.07016.49
5.4.40.0300.04016.46
5.4.30.0130.07316.38
5.4.20.0270.05316.63
5.4.10.0200.04316.64
5.4.00.0130.06315.84
5.3.290.0100.04412.80
5.3.280.0130.06314.80
5.3.270.0170.06714.63
5.3.260.0230.04714.92
5.3.250.0100.05314.91
5.3.240.0130.06014.89
5.3.230.0200.07014.67
5.3.220.0000.06014.64
5.3.210.0170.05014.71
5.3.200.0100.05014.87
5.3.190.0170.06714.87
5.3.180.0100.05014.80
5.3.170.0200.04314.88
5.3.160.0270.03714.64
5.3.150.0200.05314.84
5.3.140.0130.08014.46
5.3.130.0170.04714.74
5.3.120.0200.04714.62
5.3.110.0130.05314.84
5.3.100.0170.04714.34
5.3.90.0170.06714.31
5.3.80.0100.05014.25
5.3.70.0100.06014.21
5.3.60.0200.05014.23
5.3.50.0170.04714.18
5.3.40.0130.04714.03
5.3.30.0100.05313.99
5.3.20.0100.06013.91
5.3.10.0270.05313.95
5.3.00.0100.05713.86
5.2.170.0270.03011.46
5.2.160.0130.04711.16
5.2.150.0070.04711.45
5.2.140.0200.04011.44
5.2.130.0130.04011.41
5.2.120.0100.04711.42
5.2.110.0070.04711.42
5.2.100.0070.04711.17
5.2.90.0100.05011.41
5.2.80.0100.05011.31
5.2.70.0130.05311.33
5.2.60.0070.04011.25
5.2.50.0170.03311.25
5.2.40.0030.04311.01
5.2.30.0070.06011.28
5.2.20.0070.05711.10
5.2.10.0170.03711.18
5.2.00.0030.04711.01
5.1.60.0030.04710.39
5.1.50.0070.03710.39
5.1.40.0100.03710.39
5.1.30.0100.05010.40
5.1.20.0130.03310.39
5.1.10.0100.05010.39
5.1.00.0130.03010.39
5.0.50.0030.03310.39
5.0.40.0070.02710.39
5.0.30.0070.04710.39
5.0.20.0000.03710.39
5.0.10.0170.02710.39
5.0.00.0000.04710.39
4.4.90.0130.02310.39
4.4.80.0030.02010.39
4.4.70.0030.02010.39
4.4.60.0070.02310.39
4.4.50.0000.03310.39
4.4.40.0030.03710.39
4.4.30.0030.02310.39
4.4.20.0070.03010.39
4.4.10.0030.03710.39
4.4.00.0030.03310.39
4.3.110.0130.02310.39
4.3.100.0030.02710.39
4.3.90.0070.02310.39
4.3.80.0030.03310.39
4.3.70.0070.01710.39
4.3.60.0030.02310.39
4.3.50.0030.02310.39
4.3.40.0030.03310.39
4.3.30.0000.02310.39
4.3.20.0000.02310.39
4.3.10.0070.03010.39
4.3.00.0030.01715.59

preferences:
42.31 ms | 400 KiB | 5 Q