3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <?xml version="1.0"?> <calender> <task> <date>00/00/0000</date> <title>My Birthday</title> <description>Today is my birthday!</description> </task> <task> <date>04/08/2013</date> <title>test</title> <description>swdefswde</description> </task> <task> <date>04/02/2013</date> <title>test</title> <description>test</description> </task> <task> <date>04/01/2013</date> <title>egfwe</title> <description>wefwef</description> </task> <task> <date>04/03/2013</date> <title>ssdv</title> <description>ssdvs</description> </task> </calender> XML ); $arr=array(); foreach($xml->task as $aTask) { $arr[]=$aTask; } //print_r($arr); usort($arr,function($a,$b){ return strtotime($a->date)-strtotime($b->date); }); //print_r($arr); $xml=simplexml_load_string(<<<XML <?xml version="1.0"?> <calender> </calender> XML ); foreach($arr as $aTask) { $tTask=$xml->addChild($aTask->getName()); $tTask->addChild($aTask->date->getName(),(string)$aTask->date); $tTask->addChild($aTask->title->getName(),(string)$aTask->title); $tTask->addChild($aTask->description->getName(),(string)$aTask->description); } echo $xml->asXML();

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.0150.00617.11
8.3.50.0110.00522.18
8.3.40.0040.01119.36
8.3.30.0100.00319.33
8.3.20.0000.00920.41
8.3.10.0050.00323.91
8.3.00.0050.00319.76
8.2.180.0070.01125.92
8.2.170.0120.00919.31
8.2.160.0060.00922.96
8.2.150.0000.00725.66
8.2.140.0090.00924.66
8.2.130.0070.00026.16
8.2.120.0040.00422.64
8.2.110.0080.00320.76
8.2.100.0080.00318.09
8.2.90.0060.00318.25
8.2.80.0050.00520.73
8.2.70.0030.00618.00
8.2.60.0030.00618.00
8.2.50.0030.00718.00
8.2.40.0040.00420.10
8.2.30.0040.00418.48
8.2.20.0060.00318.27
8.2.10.0040.00418.50
8.2.00.0040.00418.07
8.1.280.0100.01025.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00020.86
8.1.230.0000.01121.22
8.1.220.0050.00318.02
8.1.210.0000.00818.99
8.1.200.0050.00517.85
8.1.190.0000.00817.85
8.1.180.0040.00418.10
8.1.170.0040.00418.00
8.1.160.0060.00322.30
8.1.150.0020.00519.15
8.1.140.0070.00017.90
8.1.130.0000.00719.30
8.1.120.0000.00717.92
8.1.110.0000.00718.00
8.1.100.0050.00217.95
8.1.90.0000.00817.91
8.1.80.0000.00717.88
8.1.70.0000.00717.86
8.1.60.0060.00318.00
8.1.50.0040.00417.81
8.1.40.0000.00817.89
8.1.30.0030.00518.00
8.1.20.0030.00618.07
8.1.10.0030.00617.98
8.1.00.0030.00617.83
8.0.300.0070.00020.42
8.0.290.0040.00417.13
8.0.280.0000.00718.72
8.0.270.0070.00017.56
8.0.260.0050.00218.77
8.0.250.0000.00817.40
8.0.240.0000.00717.37
8.0.230.0000.00817.40
8.0.220.0040.00417.32
8.0.210.0030.00317.29
8.0.200.0000.00717.43
8.0.190.0050.00317.52
8.0.180.0030.00517.49
8.0.170.0040.00417.44
8.0.160.0000.00717.46
8.0.150.0000.00717.29
8.0.140.0000.00717.36
8.0.130.0030.00313.82
8.0.120.0040.00417.32
8.0.110.0050.00217.40
8.0.100.0000.00917.32
8.0.90.0050.00317.33
8.0.80.0060.00917.31
8.0.70.0040.00417.29
8.0.60.0030.00517.50
8.0.50.0000.00817.50
8.0.30.0090.01017.60
8.0.20.0110.00817.41
8.0.10.0040.00417.60
8.0.00.0100.01117.19
7.4.330.0020.00215.00
7.4.320.0000.00717.01
7.4.300.0030.00317.06
7.4.290.0030.00316.96
7.4.280.0070.00016.93
7.4.270.0080.00016.98
7.4.260.0000.00716.90
7.4.250.0090.00016.82
7.4.240.0040.00416.88
7.4.230.0000.00717.11
7.4.220.0040.01416.96
7.4.210.0060.01116.94
7.4.200.0070.00016.76
7.4.190.0030.00317.03
7.4.160.0130.00317.14
7.4.150.0090.00917.40
7.4.140.0070.01017.86
7.4.130.0080.01016.90
7.4.120.0070.01017.00
7.4.110.0030.01417.06
7.4.100.0160.00316.84
7.4.90.0120.00917.00
7.4.80.0100.00919.39
7.4.70.0090.00916.88
7.4.60.0070.01016.90
7.4.50.0060.00317.20
7.4.40.0090.00522.77
7.4.30.0100.00716.98
7.4.00.0090.00715.37
7.3.330.0000.00613.74
7.3.320.0050.00013.74
7.3.310.0040.00416.81
7.3.300.0070.00016.73
7.3.290.0130.00716.69
7.3.280.0060.00916.75
7.3.270.0140.00417.40
7.3.260.0150.00616.91
7.3.250.0100.01116.92
7.3.240.0160.00616.93
7.3.230.0030.01416.75
7.3.210.0120.00417.06
7.3.200.0100.01619.39
7.3.190.0130.01016.79
7.3.180.0080.00817.00
7.3.170.0120.00917.07
7.3.160.0060.01016.93
7.3.120.0060.01015.20
7.3.110.0070.01015.17
7.3.100.0090.01015.20
7.3.90.0020.01415.07
7.3.80.0100.00715.09
7.3.70.0060.00815.10
7.3.60.0090.00215.13
7.3.50.0070.00715.09
7.3.40.0030.01315.12
7.3.30.0090.00815.05
7.3.20.0070.00816.40
7.3.10.0100.00416.39
7.3.00.0110.00516.31
7.2.330.0090.00817.27
7.2.320.0160.00817.01
7.2.310.0150.00317.00
7.2.300.0120.00916.96
7.2.290.0050.01117.11
7.2.250.0090.00915.53
7.2.240.0090.00915.25
7.2.230.0040.01315.34
7.2.220.0090.00915.48
7.2.210.0040.01015.20
7.2.200.0090.00915.36
7.2.190.0040.01215.38
7.2.180.0050.00915.24
7.2.170.0060.01115.24
7.2.160.0100.00615.39
7.2.150.0120.00716.31
7.2.140.0050.00816.36
7.2.130.0090.00816.26
7.2.120.0110.00416.17
7.2.110.0100.00516.35
7.2.100.0070.00716.19
7.2.90.0060.00816.31
7.2.80.0050.01016.58
7.2.70.0200.00616.44
7.2.60.0070.01016.72
7.2.50.0050.01016.19
7.2.40.0080.00716.31
7.2.30.0050.00916.22
7.2.20.0040.00916.41
7.2.10.0080.00616.30
7.2.00.0110.00716.22
7.1.330.0100.00715.51
7.1.320.0030.01215.60
7.1.310.0050.00815.55
7.1.300.0060.00915.40
7.1.290.0070.00915.35
7.1.280.0050.01015.46
7.1.270.0050.00715.47
7.1.260.0020.01115.49
7.1.250.0030.01015.18
7.1.240.0070.01115.01
7.1.230.0070.01215.04
7.1.220.0100.00915.00
7.1.210.0110.00515.13
7.1.200.0080.01015.49
7.1.190.0060.01215.02
7.1.180.0070.00714.99
7.1.170.0080.01115.11
7.1.160.0110.00714.89
7.1.150.0180.00614.91
7.1.140.0030.01314.98
7.1.130.0090.00814.97
7.1.120.0090.01115.13
7.1.110.0100.00515.03
7.1.100.0080.01114.98
7.1.90.0070.01115.12
7.1.80.0140.00315.22
7.1.70.0040.01215.86
7.1.60.0110.00515.81
7.1.50.0040.01215.88
7.1.40.0050.01015.66
7.1.30.0030.01215.65
7.1.20.0120.01115.56
7.1.10.0140.00715.79
7.1.00.0060.00815.83
7.0.330.0080.01213.86
7.0.320.0120.01213.93
7.0.310.0230.00413.84
7.0.300.0130.01313.88
7.0.290.0160.01013.71
7.0.280.0110.01113.69
7.0.270.0180.00613.81
7.0.260.0190.00613.78
7.0.250.0170.01014.11
7.0.240.0150.01213.84
7.0.230.0090.01213.74
7.0.220.0090.01413.88
7.0.210.0140.00913.73
7.0.200.0100.00715.51
7.0.190.0090.01115.47
7.0.180.0110.00815.08
7.0.170.0080.01115.18
7.0.160.0060.01015.29
7.0.150.0070.01115.21
7.0.140.0090.00715.26
7.0.130.0060.01115.49
7.0.120.0070.00715.49
7.0.110.0070.00815.27
7.0.100.0050.00915.29
7.0.90.0080.00615.35
7.0.80.0090.00715.29
7.0.70.0080.01015.35
7.0.60.0090.00715.24
7.0.50.0050.01115.31
7.0.40.0140.00314.47
7.0.30.0070.00914.44
7.0.20.0100.00714.35
7.0.10.0110.00414.40
7.0.00.0040.01014.27
5.6.400.0080.01814.83
5.6.390.0110.01414.71
5.6.380.0120.00914.76
5.6.370.0130.01114.98
5.6.360.0160.00914.73
5.6.350.0200.00714.45
5.6.340.0120.00814.46
5.6.330.0170.01014.67
5.6.320.0120.01214.58
5.6.310.0220.00314.84
5.6.300.0100.02617.81
5.6.290.0090.02817.78
5.6.280.0100.02717.95
5.6.270.0050.02917.85
5.6.260.0100.02918.00
5.6.250.0100.03717.91
5.6.240.0030.03517.69
5.6.230.0080.02817.79
5.6.220.0110.03117.82
5.6.210.0130.02617.64
5.6.200.0100.02517.88
5.6.190.0110.02517.84
5.6.180.0070.02617.86
5.6.170.0140.03217.81
5.6.160.0080.03117.84
5.6.150.0130.02517.79
5.6.140.0100.02917.85
5.6.130.0090.02817.84
5.6.120.0090.02917.80
5.6.110.0120.02617.76
5.6.100.0140.02317.79
5.6.90.0120.02317.90
5.6.80.0110.03317.38
5.6.70.0120.02417.48
5.6.60.0050.03117.53
5.6.50.0060.02817.46
5.6.40.0120.02017.54
5.6.30.0110.02417.46
5.6.20.0100.02317.50
5.6.10.0140.01817.49
5.6.00.0090.02417.46
5.5.380.0070.03216.20
5.5.370.0070.04616.10
5.5.360.0050.03016.08
5.5.350.0060.02816.16
5.5.340.0160.02316.37
5.5.330.0100.03216.46
5.5.320.0050.03216.49
5.5.310.0140.02216.42
5.5.300.0070.02616.40
5.5.290.0080.02916.16
5.5.280.0120.04016.30
5.5.270.0050.03116.41
5.5.260.0080.02916.29
5.5.250.0070.02916.27
5.5.240.0090.02115.88
5.5.230.0100.02415.69
5.5.220.0120.02116.19
5.5.210.0070.02215.99
5.5.200.0120.02015.96
5.5.190.0110.02016.04
5.5.180.0110.02515.90
5.5.170.0080.01414.50
5.5.160.0070.02716.17
5.5.150.0070.02216.05
5.5.140.0080.02415.88
5.5.130.0140.01815.97
5.5.120.0090.04116.12
5.5.110.0100.02916.01
5.5.100.0130.02315.90
5.5.90.0050.02715.99
5.5.80.0110.02315.89
5.5.70.0050.03115.91
5.5.60.0070.02615.91
5.5.50.0130.02215.91
5.5.40.0040.03015.96
5.5.30.0130.02015.75
5.5.20.0090.02416.01
5.5.10.0040.02815.91
5.5.00.0060.02816.00
5.4.450.0020.02815.45
5.4.440.0060.02915.44
5.4.430.0060.02615.43
5.4.420.0050.02715.37
5.4.410.0070.02415.33
5.4.400.0090.02115.25
5.4.390.0070.02315.34
5.4.380.0040.02615.36
5.4.370.0110.01815.27
5.4.360.0030.02615.19
5.4.350.0040.02815.20
5.4.340.0070.02315.38
5.4.330.0110.00711.37
5.4.320.0100.02315.19
5.4.310.0050.02215.24
5.4.300.0080.02315.27
5.4.290.0110.03415.16
5.4.280.0050.02615.19
5.4.270.0110.02115.28
5.4.260.0080.02315.19
5.4.250.0050.02915.20
5.4.240.0090.02215.23
5.4.230.0070.02115.22
5.4.220.0100.02215.26
5.4.210.0060.02415.30
5.4.200.0090.02315.35
5.4.190.0060.02315.14
5.4.180.0050.02615.16
5.4.170.0060.02415.22
5.4.160.0070.02215.15
5.4.150.0060.02415.14
5.4.140.0030.02414.06
5.4.130.0060.02414.01
5.4.120.0060.02114.11
5.4.110.0070.02013.89
5.4.100.0100.02314.04
5.4.90.0050.02514.06
5.4.80.0050.02114.14
5.4.70.0070.02514.02
5.4.60.0070.02214.08
5.4.50.0070.02214.17
5.4.40.0070.02114.03
5.4.30.0040.02314.00
5.4.20.0040.02414.03
5.4.10.0070.02414.11
5.4.00.0080.02013.82
5.3.290.0060.02513.08
5.3.280.0060.02212.83
5.3.270.0070.02312.84
5.3.260.0110.02612.92
5.3.250.0060.02412.87
5.3.240.0040.02512.87
5.3.230.0070.02212.92
5.3.220.0050.02212.92
5.3.210.0060.02312.80
5.3.200.0050.02412.81
5.3.190.0050.02412.91
5.3.180.0090.02012.81
5.3.170.0090.02413.01
5.3.160.0040.02712.99
5.3.150.0080.01912.92
5.3.140.0090.02212.92
5.3.130.0050.02612.92
5.3.120.0070.02512.84
5.3.110.0060.02212.93
5.3.100.0050.02412.90
5.3.90.0080.01812.84
5.3.80.0050.02412.77
5.3.70.0090.02012.77
5.3.60.0060.03212.86
5.3.50.0090.02312.77
5.3.40.0090.01912.84
5.3.30.0070.02012.86
5.3.20.0070.02012.82
5.3.10.0050.02012.73
5.3.00.0060.02212.73
5.2.170.0030.02112.73
5.2.160.0070.02012.73
5.2.150.0080.01712.73
5.2.140.0070.01712.73
5.2.130.0060.01612.73
5.2.120.0100.01512.73
5.2.110.0060.01712.73
5.2.100.0070.01612.73
5.2.90.0060.01512.73
5.2.80.0060.01712.73
5.2.70.0060.02012.73
5.2.60.0020.02212.73
5.2.50.0160.01612.73
5.2.40.0070.01712.73
5.2.30.0080.01512.73
5.2.20.0060.01812.73
5.2.10.0020.02312.73
5.2.00.0050.01812.73
5.1.60.0070.01612.73
5.1.50.0050.01612.73
5.1.40.0090.01012.73
5.1.30.0040.01712.73
5.1.20.0070.01412.73
5.1.10.0060.01512.73
5.1.00.0050.01612.73
5.0.50.0050.01112.73
5.0.40.0050.01212.73
5.0.30.0030.01912.73
5.0.20.0060.01012.73
5.0.10.0100.01512.73
5.0.00.0050.01712.73
4.4.90.0040.00912.73
4.4.80.0020.01012.73
4.4.70.0010.01212.73
4.4.60.0020.01012.73
4.4.50.0030.00812.73
4.4.40.0040.01312.73
4.4.30.0020.01012.73
4.4.20.0020.01212.73
4.4.10.0050.00912.73
4.4.00.0020.01612.73
4.3.110.0070.00612.73
4.3.100.0050.00812.73
4.3.90.0070.00512.73
4.3.80.0040.01412.73
4.3.70.0020.01112.73
4.3.60.0020.01212.73
4.3.50.0040.00912.73
4.3.40.0050.01312.73
4.3.30.0050.00812.73
4.3.20.0020.01012.73
4.3.10.0040.01112.73
4.3.00.0030.00812.73

preferences:
56.4 ms | 401 KiB | 5 Q