3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result5 = array( array('start_date' => '2005-10-12', 'name_event' => 'test1'), array('start_date' => '2006-10-12', 'name_event' => 'test2'), ); $daily_html = ''; foreach($result5 as $row5) { $time=strtotime($row5['start_date']); $day = date("d",$time); $month= date("m",$time); $month2= date("F",$time); $year=date("Y",$time); echo "$day $month $year ".$row5['name_event'] ; // this show me correct echo '<br/>'; addDailyHtml( "Event", "$day-$month-$year", null, $daily_html);// there is some problem } var_dump($daily_html); function addDailyHtml( $html, $start_date_string, $end_date_string = null, &$daily_html ) { static $htmlCount = 0; $start_date = strtotime($start_date_string); if( $end_date_string ) { $end_date = strtotime($end_date_string); } else { $end_date = $start_date; } $working_date = $start_date; do { $tDate = getdate($working_date); $working_date += 86400; $daily_html[$tDate['year']][$tDate['mon']][$tDate['mday']][$htmlCount] = $html; } while( $working_date < $end_date + 1 ); $htmlCount++; }

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.0120.00319.07
8.3.30.0090.00619.09
8.3.20.0080.00020.04
8.3.10.0050.00323.56
8.3.00.0030.00522.37
8.2.170.0150.00022.96
8.2.160.0070.00722.20
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00822.06
8.2.110.0040.00819.33
8.2.100.0030.01018.16
8.2.90.0040.00418.16
8.2.80.0080.00318.00
8.2.70.0000.00817.88
8.2.60.0070.00418.16
8.2.50.0090.00318.07
8.2.40.0030.00519.39
8.2.30.0040.00418.06
8.2.20.0060.00318.05
8.2.10.0030.00517.87
8.2.00.0060.00318.04
8.1.270.0000.00824.01
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0030.00622.55
8.1.230.0090.00320.71
8.1.220.0000.00817.77
8.1.210.0000.00818.98
8.1.200.0060.00317.48
8.1.190.0000.00817.55
8.1.180.0030.00518.10
8.1.170.0000.00818.41
8.1.160.0040.00422.06
8.1.150.0000.00718.82
8.1.140.0030.00617.55
8.1.130.0030.00317.95
8.1.120.0040.00417.68
8.1.110.0040.00417.55
8.1.100.0040.00417.58
8.1.90.0040.00417.63
8.1.80.0000.00717.53
8.1.70.0070.00017.53
8.1.60.0040.00417.61
8.1.50.0050.00317.54
8.1.40.0040.00417.58
8.1.30.0080.00017.82
8.1.20.0030.00617.73
8.1.10.0000.00817.60
8.1.00.0080.00417.73
8.0.300.0030.00619.89
8.0.290.0000.00817.13
8.0.280.0070.00018.50
8.0.270.0030.00317.20
8.0.260.0000.00716.98
8.0.250.0030.00317.19
8.0.240.0070.00017.21
8.0.230.0040.00317.18
8.0.220.0000.00717.17
8.0.210.0050.00217.12
8.0.200.0020.00517.21
8.0.190.0050.00317.23
8.0.180.0080.00017.25
8.0.170.0040.00417.23
8.0.160.0000.00717.12
8.0.150.0040.00417.13
8.0.140.0040.00417.11
8.0.130.0000.00513.59
8.0.120.0040.00417.02
8.0.110.0060.00317.05
8.0.100.0000.00716.96
8.0.90.0000.00717.21
8.0.80.0150.00317.13
8.0.70.0030.00517.17
8.0.60.0000.00716.98
8.0.50.0030.00617.12
8.0.30.0140.00517.33
8.0.20.0090.01217.50
8.0.10.0040.00417.14
8.0.00.0130.00617.01
7.4.330.0000.00515.07
7.4.320.0000.00716.77
7.4.300.0030.00316.75
7.4.290.0000.00716.65
7.4.280.0030.00316.58
7.4.270.0040.00416.69
7.4.260.0030.00316.56
7.4.250.0040.00416.53
7.4.240.0020.00516.74
7.4.230.0030.00516.85
7.4.220.0060.00916.74
7.4.210.0050.00916.63
7.4.200.0020.00516.64
7.4.190.0000.00716.61
7.4.160.0110.00616.68
7.4.150.0140.00617.40
7.4.140.0170.00017.86
7.4.130.0080.00816.72
7.4.120.0090.00816.73
7.4.110.0120.00616.53
7.4.100.0120.00616.52
7.4.90.0150.00416.89
7.4.80.0140.00416.72
7.4.70.0090.00916.82
7.4.60.0060.01116.69
7.4.50.0060.00616.48
7.4.40.0090.00622.77
7.4.30.0110.00416.55
7.4.00.0040.00414.91
7.3.330.0000.00513.57
7.3.320.0030.00313.51
7.3.310.0040.00416.56
7.3.300.0070.00016.42
7.3.290.0080.00816.50
7.3.280.0100.00816.57
7.3.270.0100.00717.40
7.3.260.0110.00716.61
7.3.250.0140.00916.65
7.3.240.0030.01516.87
7.3.230.0160.00016.75
7.3.210.0140.00316.53
7.3.200.0090.01219.39
7.3.190.0060.01616.67
7.3.180.0080.00816.57
7.3.170.0100.00716.68
7.3.160.0090.00616.80
7.3.120.0070.00714.92
7.2.330.0060.01216.81
7.2.320.0060.01117.03
7.2.310.0170.00617.04
7.2.300.0170.00316.82
7.2.290.0040.01216.99
7.2.60.0070.00416.88
7.2.00.0030.01519.73
7.1.200.0100.00015.89
7.1.100.0070.01118.23
7.1.70.0040.00417.38
7.1.60.0090.01519.29
7.1.50.0070.01716.95
7.1.00.0100.07022.31
7.0.200.0100.00316.99
7.0.140.0000.07321.99
7.0.90.0230.07019.91
7.0.80.0130.07319.96
7.0.70.0070.08319.94
7.0.60.0200.07019.76
7.0.50.0030.08320.32
7.0.40.0200.07720.00
7.0.30.0100.09020.11
7.0.20.0030.05019.94
7.0.10.0070.08320.04
7.0.00.0000.08320.03
5.6.280.0030.07720.91
5.6.240.0100.08020.67
5.6.230.0070.08320.64
5.6.220.0030.08720.56
5.6.210.0000.08720.65
5.6.200.0070.08320.98
5.6.190.0130.07021.14
5.6.180.0070.08721.11
5.6.170.0100.04021.04
5.6.160.0030.07021.17
5.6.150.0100.08021.14
5.6.140.0100.07721.05
5.6.130.0070.08721.08
5.6.120.0130.08021.09
5.6.110.0000.05720.93
5.6.100.0100.08320.93
5.6.90.0070.08720.94
5.6.80.0100.07020.35
5.6.70.0130.07720.43
5.6.60.0130.07320.42
5.6.50.0030.08320.34
5.6.40.0030.06720.46
5.6.30.0030.07020.39
5.6.20.0000.04320.38
5.6.10.0070.03720.38
5.6.00.0030.04020.36
5.5.380.0030.05720.35
5.5.370.0100.04720.52
5.5.360.0030.06320.36
5.5.350.0070.08020.46
5.5.340.0130.07720.89
5.5.330.0070.07020.93
5.5.320.0170.07720.80
5.5.310.0070.04720.88
5.5.300.0030.08720.90
5.5.290.0130.08020.80
5.5.280.0130.08020.89
5.5.270.0030.05020.93
5.5.260.0170.06020.87
5.5.250.0030.08020.69
5.5.240.0130.07020.19
5.5.230.0070.08020.26
5.5.220.0030.07320.30
5.5.210.0030.08020.02
5.5.200.0030.08720.20
5.5.190.0070.04320.27
5.5.180.0100.03720.00
5.5.160.0030.04320.28
5.5.150.0100.03320.14
5.5.140.0100.03720.16
5.5.130.0070.03720.10
5.5.120.0130.03020.06
5.5.110.0070.04320.08
5.5.100.0100.03320.07
5.5.90.0000.04319.95
5.5.80.0000.04319.96
5.5.70.0070.03720.16
5.5.60.0070.04020.09
5.5.50.0030.05020.09
5.5.40.0030.04019.94
5.5.30.0000.04320.03
5.5.20.0000.04019.95
5.5.10.0070.03319.92
5.5.00.0070.03320.05
5.4.450.0130.08019.23
5.4.440.0030.09019.56
5.4.430.0070.06019.36
5.4.420.0030.07719.55
5.4.410.0070.07019.09
5.4.400.0100.07719.23
5.4.390.0070.04018.95
5.4.380.0100.07719.04
5.4.370.0230.05719.23
5.4.360.0070.08018.85
5.4.350.0100.04719.04
5.4.340.0170.03019.05
5.4.320.0100.03719.18
5.4.310.0030.03719.05
5.4.300.0030.04018.95
5.4.290.0070.03718.90
5.4.280.0030.04019.17
5.4.270.0030.03719.12
5.4.260.0100.03019.05
5.4.250.0000.04018.90
5.4.240.0030.06719.09
5.4.230.0100.03719.13
5.4.220.0070.06318.94
5.4.210.0030.04018.89
5.4.200.0100.03019.20
5.4.190.0000.04018.86
5.4.180.0030.05319.04
5.4.170.0030.04718.84
5.4.160.0030.03718.93
5.4.150.0030.04019.16
5.4.140.0000.04016.44
5.4.130.0000.04316.44
5.4.120.0070.03716.44
5.4.110.0030.04016.45
5.4.100.0000.04716.35
5.4.90.0000.03716.34
5.4.80.0000.03716.47
5.4.70.0070.03716.49
5.4.60.0030.03716.25
5.4.50.0000.03316.34
5.4.40.0030.03016.52
5.4.30.0070.03716.36
5.4.20.0030.03716.31
5.4.10.0030.04016.40
5.4.00.0000.03715.89
5.3.290.0030.04014.66
5.3.280.0000.04014.74
5.3.270.0000.03714.68
5.3.260.0070.03314.55
5.3.250.0000.04014.61
5.3.240.0100.05314.72
5.3.230.0100.06014.72
5.3.220.0070.03314.58
5.3.210.0030.03714.57
5.3.200.0000.04014.69
5.3.190.0070.03314.54
5.3.180.0000.04014.56
5.3.170.0030.03714.52
5.3.160.0000.03714.69
5.3.150.0000.04014.66
5.3.140.0000.04014.70
5.3.130.0100.02714.67
5.3.120.0000.04014.60
5.3.110.0000.04314.60
5.3.100.0030.03014.16
5.3.90.0030.03713.98
5.3.80.0000.06714.08
5.3.70.0000.04014.08
5.3.60.0030.05713.93
5.3.50.0030.05314.10
5.3.40.0030.03314.02
5.3.30.0000.07313.97
5.3.20.0030.06713.59
5.3.10.0030.07713.55
5.3.00.0130.03313.78
5.2.170.0030.06311.05
5.2.160.0070.05011.15
5.2.150.0070.06011.04
5.2.140.0100.05711.20
5.2.130.0030.06011.21
5.2.120.0100.04711.17
5.2.110.0030.05711.02
5.2.100.0030.06011.13
5.2.90.0030.06311.04
5.2.80.0070.05710.98
5.2.70.0070.06311.11
5.2.60.0000.06311.04
5.2.50.0070.06011.01
5.2.40.0070.05710.91
5.2.30.0030.06011.10
5.2.20.0130.05311.11
5.2.10.0070.05310.93
5.2.00.0030.05710.71
5.1.60.0070.05310.50
5.1.50.0030.05710.50
5.1.40.0030.02310.50
5.1.30.0070.05010.50
5.1.20.0030.06010.50
5.1.10.0070.05010.50
5.1.00.0100.04010.50
5.0.50.0000.05010.50
5.0.40.0070.04010.50
5.0.30.0000.06710.50
5.0.20.0070.04310.50
5.0.10.0030.04310.50
5.0.00.0000.07010.50
4.4.90.0000.02310.50
4.4.80.0000.04010.50
4.4.70.0000.02310.50
4.4.60.0000.02310.50
4.4.50.0000.04010.50
4.4.40.0000.05710.50
4.4.30.0030.03010.50
4.4.20.0030.02710.50
4.4.10.0030.03310.50
4.4.00.0070.04710.50
4.3.110.0000.02010.50
4.3.100.0000.03710.50
4.3.90.0030.03710.50
4.3.80.0100.04710.50
4.3.70.0000.02310.50
4.3.60.0070.02710.50
4.3.50.0000.03710.50
4.3.40.0070.03710.50
4.3.30.0000.04010.50
4.3.20.0030.03310.50
4.3.10.0000.03710.50
4.3.00.0030.03310.50

preferences:
41.5 ms | 400 KiB | 5 Q