3v4l.org

run code in 300+ PHP versions simultaneously
<?php function extract_holidays($employee /* Array */, $new_holidays /* Array */) { $new_holidays[] = [ "name" => $employee["firstname"].' '.$employee["lastname"], "startDate" => '2014-01-01', "endDate" => '2014-01-07' ]; } $response = json_decode('[{"firstname":"system","lastname":"system","id_employee":"24040","schedule":{"2014-07-01":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-02":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-03":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-04":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-05":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-06":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]},"2014-07-07":{"text":"OFF","id_event":"22","event_name":"off","color":"AAAAAA","is_work":false,"details":[]}}},{"firstname":"amira","lastname":"turki","id_employee":"28472","schedule":{"2014-07-01":{"text":"7h30-17h","id_event":"1","event_name":"planifi\u00e9","color":"FFFFFF","is_work":true,"details":[{"event_name":"planifi\u00e9","id_event":"1","is_work":"1","start":1404192600,"end":1404226800}]},"2014-07-02":{"text":"7h30-17h","id_event":"1","event_name":"planifi\u00e9","color":"FFFFFF","is_work":true,"details":[{"event_name":"planifi\u00e9","id_event":"1","is_work":"1","start":1404279000,"end":1404313200}]},"2014-07-03":{"text":"7h30-17h","id_event":"1","event_name":"planifi\u00e9","color":"FFFFFF","is_work":true,"details":[{"event_name":"planifi\u00e9","id_event":"1","is_work":"1","start":1404365400,"end":1404399600}]},"2014-07-04":{"text":"7h30-17h","id_event":"1","event_name":"planifi\u00e9","color":"FFFFFF","is_work":true,"details":[{"event_name":"planifi\u00e9","id_event":"1","is_work":"1","start":1404451800,"end":1404486000}]},"2014-07-05":{"text":"REPOS","id_event":"20","event_name":"repos","color":"FFFFAA","is_work":false,"details":[]},"2014-07-06":{"text":"REPOS","id_event":"20","event_name":"repos","color":"FFFFAA","is_work":false,"details":[]},"2014-07-07":{"text":"7h30-17h","id_event":"1","event_name":"planifi\u00e9","color":"FFFFFF","is_work":true,"details":[{"event_name":"planifi\u00e9","id_event":"1","is_work":"1","start":1404711000,"end":1404745200}]}}}]',true); var_dump($response); $new_holidays = []; /* foreach($response as $employee) { extract_holidays($employee, $new_holidays); } echo json_encode($new_holidays,true); */

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.0170.00316.75
8.3.50.0100.00621.86
8.3.40.0070.01018.46
8.3.30.0120.00418.93
8.3.20.0090.00020.21
8.3.10.0030.00623.45
8.3.00.0040.00419.02
8.2.180.0100.01016.48
8.2.170.0100.00722.96
8.2.160.0040.01120.38
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0030.00626.16
8.2.120.0040.00420.74
8.2.110.0060.00622.25
8.2.100.0090.00317.66
8.2.90.0060.00519.03
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0100.00017.93
8.2.50.0030.00618.07
8.2.40.0060.00321.05
8.2.30.0000.00718.11
8.2.20.0000.00817.68
8.2.10.0000.00818.05
8.2.00.0050.00217.63
8.1.280.0100.00625.92
8.1.270.0000.00923.91
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00322.06
8.1.230.0080.00419.08
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0050.01017.22
8.1.190.0040.00417.25
8.1.180.0030.00618.10
8.1.170.0040.00418.50
8.1.160.0030.00621.97
8.1.150.0030.00518.55
8.1.140.0000.00817.30
8.1.130.0000.00817.88
8.1.120.0070.00017.41
8.1.110.0030.00617.33
8.1.100.0040.00417.43
8.1.90.0040.00417.36
8.1.80.0040.00417.30
8.1.70.0040.00417.35
8.1.60.0040.00417.56
8.1.50.0060.00317.43
8.1.40.0060.00317.45
8.1.30.0040.00417.43
8.1.20.0000.00817.59
8.1.10.0060.00317.44
8.1.00.0050.00317.40
8.0.300.0040.00418.77
8.0.290.0000.00817.05
8.0.280.0000.00718.39
8.0.270.0040.00417.25
8.0.260.0030.00317.20
8.0.250.0030.00316.80
8.0.240.0030.00616.94
8.0.230.0040.00416.75
8.0.220.0070.00016.91
8.0.210.0040.00416.75
8.0.200.0000.00816.85
8.0.190.0040.00416.92
8.0.180.0030.00516.89
8.0.170.0040.00416.76
8.0.160.0050.00316.85
8.0.150.0050.00316.80
8.0.140.0080.00416.82
8.0.130.0100.00013.32
8.0.120.0040.00416.87
8.0.110.0030.00516.75
8.0.100.0060.00316.68
8.0.90.0080.00016.82
8.0.80.0030.01316.72
8.0.70.0030.00516.81
8.0.60.0000.00816.84
8.0.50.0030.00516.89
8.0.30.0110.01617.05
8.0.20.0160.00717.40
8.0.10.0050.00317.02
8.0.00.0190.00516.62
7.4.330.0060.00015.10
7.4.320.0030.00316.36
7.4.300.0000.00816.40
7.4.290.0040.00416.33
7.4.280.0030.00616.39
7.4.270.0070.00016.44
7.4.260.0000.00716.32
7.4.250.0040.00416.48
7.4.240.0040.00416.47
7.4.230.0030.00516.29
7.4.220.0130.01716.53
7.4.210.0080.00816.46
7.4.200.0000.00716.56
7.4.190.0040.00416.50
7.4.160.0110.00816.39
7.4.150.0110.01117.40
7.4.140.0150.00717.86
7.4.130.0160.00816.34
7.4.120.0070.01516.51
7.4.110.0120.00816.31
7.4.100.0080.01416.48
7.4.90.0090.01216.33
7.4.80.0040.01919.39
7.4.70.0060.01216.25
7.4.60.0060.01216.31
7.4.50.0030.00616.62
7.4.40.0100.01116.56
7.4.30.0140.00716.41
7.4.00.0130.00314.93
7.3.330.0060.00013.17
7.3.320.0050.00213.16
7.3.310.0040.00416.16
7.3.300.0020.00516.20
7.3.290.0070.00716.17
7.3.280.0070.01316.16
7.3.270.0180.00917.40
7.3.260.0100.01416.18
7.3.250.0120.01016.35
7.3.240.0110.01116.19
7.3.230.0110.01116.39
7.3.210.0140.00816.15
7.3.200.0090.01219.39
7.3.190.0120.00816.34
7.3.180.0210.00416.22
7.3.170.0090.00916.27
7.3.160.0120.00616.39
7.3.120.0100.00814.67
7.3.110.0070.01314.84
7.3.100.0040.00714.54
7.3.90.0090.00614.32
7.3.80.0000.01114.63
7.3.70.0080.00814.56
7.3.60.0100.01014.51
7.3.50.0000.01414.65
7.3.40.0120.00314.31
7.3.30.0070.00714.62
7.3.20.0030.01016.37
7.3.10.0120.00616.40
7.3.00.0030.01016.27
7.2.330.0100.01316.62
7.2.320.0130.00716.50
7.2.310.0160.00416.30
7.2.300.0080.01116.58
7.2.290.0130.01316.39
7.2.250.0070.01414.77
7.2.240.0120.00914.69
7.2.230.0080.00414.96
7.2.220.0150.00314.70
7.2.210.0000.01414.79
7.2.200.0030.01014.63
7.2.190.0040.01414.83
7.2.180.0100.01014.61
7.2.170.0070.00714.96
7.2.130.0000.01316.67
7.2.120.0030.01216.55
7.2.110.0040.00716.30
7.2.100.0060.00616.74
7.2.90.0080.00416.62
7.2.80.0080.00416.61
7.2.70.0030.00916.44
7.2.60.0030.00816.74
7.2.50.0090.00616.43
7.2.40.0080.00416.88
7.2.30.0050.00816.92
7.2.20.0060.00916.58
7.2.10.0030.01016.79
7.2.00.0100.00617.88
7.1.330.0070.01115.60
7.1.320.0030.01315.78
7.1.310.0070.00715.84
7.1.300.0140.00715.51
7.1.290.0030.01715.67
7.1.280.0030.00615.76
7.1.270.0140.00315.68
7.1.260.0100.00715.52
7.1.250.0080.00415.75
7.1.240.0040.00715.56
7.1.230.0030.00715.69
7.1.220.0060.01015.58
7.1.210.0100.00015.34
7.1.200.0000.01515.37
7.1.190.0080.00315.59
7.1.180.0040.00715.47
7.1.170.0000.01115.77
7.1.160.0040.00715.45
7.1.150.0030.00915.72
7.1.140.0030.00915.76
7.1.130.0030.01315.50
7.1.120.0060.00315.78
7.1.110.0030.01015.66
7.1.100.0030.01016.76
7.1.90.0040.00715.74
7.1.80.0110.00415.50
7.1.70.0060.00716.42
7.1.60.0020.01517.59
7.1.50.0030.01016.21
7.1.40.0060.00615.20
7.1.30.0030.00915.67
7.1.20.0070.00715.71
7.1.10.0080.00415.75
7.1.00.0030.04518.99
7.0.330.0040.00715.01
7.0.320.0070.00415.16
7.0.310.0100.00015.42
7.0.300.0040.00715.34
7.0.290.0030.00915.16
7.0.280.0080.00015.26
7.0.270.0110.00015.00
7.0.260.0030.00715.09
7.0.250.0050.00515.38
7.0.240.0040.00715.37
7.0.230.0000.01415.39
7.0.220.0040.00814.98
7.0.210.0040.01115.27
7.0.200.0070.00515.85
7.0.190.0070.00315.03
7.0.180.0000.01015.20
7.0.170.0040.00515.11
7.0.160.0060.01015.21
7.0.150.0060.00915.13
7.0.140.0020.04318.55
7.0.130.0070.00715.07
7.0.120.0030.01015.28
7.0.110.0060.00615.06
7.0.100.0060.00915.18
7.0.90.0000.01715.15
7.0.80.0100.00715.27
7.0.70.0110.00414.95
7.0.60.0070.04017.61
7.0.50.0110.04116.71
7.0.40.0050.03916.60
7.0.30.0170.04616.68
7.0.20.0270.03516.85
7.0.10.0040.03116.85
7.0.00.0030.04816.82
5.6.380.0080.00314.51
5.6.370.0070.00714.10
5.6.360.0030.00614.52
5.6.350.0000.01314.45
5.6.340.0000.01113.79
5.6.330.0040.00714.11
5.6.320.0090.00314.24
5.6.310.0060.00614.35
5.6.300.0000.01214.13
5.6.290.0080.00414.18
5.6.280.0070.04017.55
5.6.270.0100.00314.51
5.6.260.0130.00314.40
5.6.250.0030.01014.14
5.6.240.0070.00713.99
5.6.230.0030.01214.15
5.6.220.0080.00314.17
5.6.210.0120.04417.31
5.6.200.0040.02916.12
5.6.190.0110.04617.34
5.6.180.0220.04517.31
5.6.170.0200.04017.22
5.6.160.0050.04617.38
5.6.150.0140.01516.13
5.6.140.0080.03316.16
5.6.130.0020.02916.05
5.6.120.0070.04817.59
5.6.110.0100.02217.58
5.6.100.0150.03817.58
5.6.90.0130.04517.65
5.6.80.0080.03217.30
5.6.70.0000.01314.14
5.6.60.0000.01414.01
5.6.50.0070.00713.93
5.6.40.0100.00713.84
5.6.30.0120.00314.21
5.6.20.0030.01214.08
5.6.10.0120.00013.87
5.6.00.0040.01113.86
5.5.380.0030.00311.10
5.5.370.0100.00311.18
5.5.360.0000.01111.14
5.5.350.0090.02215.81
5.5.340.0090.03814.58
5.5.330.0130.03515.64
5.5.320.0050.04315.65
5.5.310.0170.04215.75
5.5.300.0030.04414.48
5.5.290.0110.03114.58
5.5.280.0060.02615.94
5.5.270.0050.02715.90
5.5.260.0030.02215.95
5.5.250.0070.04315.85
5.5.240.0170.03515.64
5.5.230.0000.00610.90
5.5.220.0050.00311.07
5.5.210.0070.00710.90
5.5.200.0000.00910.90
5.5.190.0060.00610.92
5.5.180.0080.00411.06
5.5.170.0030.00611.04
5.5.160.0000.01110.90
5.5.150.0040.00811.12
5.5.140.0060.00611.00
5.5.130.0030.00610.97
5.5.120.0030.00511.02
5.5.110.0030.00611.20
5.5.100.0030.01010.97
5.5.90.0070.00410.90
5.5.80.0080.00310.90
5.5.70.0040.00411.08
5.5.60.0030.00710.90
5.5.50.0050.00311.10
5.5.40.0100.00311.07
5.5.30.0080.00010.90
5.5.20.0030.00510.98
5.5.10.0070.00710.98
5.5.00.0000.01310.92
5.4.450.0170.04115.16
5.4.440.0140.03915.29
5.4.430.0180.02315.11
5.4.420.0150.04015.08
5.4.410.0190.03615.26
5.4.400.0150.03615.03
5.4.390.0180.01515.11
5.4.380.0150.02014.99
5.4.370.0200.02515.07
5.4.360.0120.04314.90
5.4.350.0220.03215.08
5.4.340.0150.03914.89
5.4.330.0030.00610.93
5.4.320.0200.02115.04
5.4.310.0160.03715.11
5.4.300.0150.04114.99
5.4.290.0200.02314.94
5.4.280.0200.02214.86
5.4.270.0240.02714.95
5.4.260.0120.04015.00
5.4.250.0190.02315.07
5.4.240.0150.03715.10
5.4.230.0100.02815.05
5.4.220.0190.03514.87
5.4.210.0180.02814.98
5.4.200.0130.02615.06
5.4.190.0170.03215.02
5.4.180.0140.03614.98
5.4.170.0170.04015.06
5.4.160.0210.01715.05
5.4.150.0150.04214.88
5.4.140.0120.02413.64
5.4.130.0120.02413.71
5.4.120.0170.02313.77
5.4.110.0160.02113.73
5.4.100.0150.02113.81
5.4.90.0180.02713.58
5.4.80.0230.03313.58
5.4.70.0160.02613.72
5.4.60.0170.03513.73
5.4.50.0190.03413.72
5.4.40.0190.03313.73
5.4.30.0140.02213.74
5.4.20.0180.01813.67
5.4.10.0210.02813.71
5.4.00.0100.03713.38
5.3.290.0190.03712.84
5.3.280.0190.03512.82
5.3.270.0160.02512.71
5.3.260.0150.02312.81
5.3.250.0170.03812.83
5.3.240.0140.02112.79
5.3.230.0130.02212.75
5.3.220.0080.02812.74
5.3.210.0120.02312.85
5.3.200.0120.03812.84
5.3.190.0170.03712.78
5.3.180.0160.03912.74
5.3.170.0120.04212.70
5.3.160.0190.03512.74
5.3.150.0120.03712.84
5.3.140.0200.03312.71
5.3.130.0150.02612.72
5.3.120.0170.03512.76
5.3.110.0150.02012.71
5.3.100.0130.03712.68
5.3.90.0200.03512.68
5.3.80.0120.03012.68
5.3.70.0150.02212.68
5.3.60.0240.02812.68
5.3.50.0170.02612.68
5.3.40.0170.01812.68
5.3.30.0120.02512.68
5.3.20.0190.03312.68
5.3.10.0150.03412.68
5.3.00.0150.01812.68
5.2.170.0180.02512.68
5.2.160.0100.02112.68
5.2.150.0120.03312.68
5.2.140.0140.01912.68
5.2.130.0150.02312.68
5.2.120.0160.02812.68
5.2.110.0130.01812.68
5.2.100.0120.03312.68
5.2.90.0130.01912.68
5.2.80.0150.01612.68
5.2.70.0120.02812.68
5.2.60.0120.03312.68
5.2.50.0170.02812.68
5.2.40.0120.03312.68
5.2.30.0100.03312.68
5.2.20.0100.02112.68
5.2.10.0120.02212.68
5.2.00.0080.02312.68
5.1.60.0100.01812.68
5.1.50.0130.02712.68
5.1.40.0100.02912.68
5.1.30.0130.02512.68
5.1.20.0130.02612.68
5.1.10.0080.02712.68
5.1.00.0130.02512.68
5.0.50.0100.02012.68
5.0.40.0080.02212.68
5.0.30.0030.02812.68
5.0.20.0070.02412.68
5.0.10.0050.01812.68
5.0.00.0090.03112.68
4.4.90.0050.01312.68
4.4.80.0080.01512.68
4.4.70.0040.01412.68
4.4.60.0030.01212.68
4.4.50.0080.01312.68
4.4.40.0030.02912.68
4.4.30.0080.01012.68
4.4.20.0060.02012.68
4.4.10.0070.01812.68
4.4.00.0100.02512.68
4.3.110.0070.01812.68
4.3.100.0050.02012.68
4.3.90.0060.01612.68
4.3.80.0050.01612.68
4.3.70.0080.01012.68
4.3.60.0070.00912.68
4.3.50.0050.01212.68
4.3.40.0050.01312.68
4.3.30.0020.02012.68
4.3.20.0050.01812.68
4.3.10.0010.01112.68
4.3.00.0020.02112.68

preferences:
45.02 ms | 401 KiB | 5 Q