3v4l.org

run code in 300+ PHP versions simultaneously
<? $filexml='data.xml'; preg_match("/([a-zA-Z0-9_-]+).([a-zA-Z0-9]+)/", $filexml, $extension); //$timestamp = date("Y-m-d_H:i:s"); $timestamp = time(); //$timestamp gets current time $myFile = data.$timestamp.".".$extension[2]; echo $myFile; file_put_contents($myFile, file_get_contents("input.txt")); $mycsvFile = "orderData.".$timestamp.".csv"; // timestamp to file name echo $mycsvFile; if (file_exists($myFile)) { $xml = simplexml_load_file($myFile); $f = fopen($mycsvFile, 'w'); // open and write to file createCsv($xml, $f); fclose($f); } function createCsv($xml,$f) { foreach ($xml->children() as $item) { $hasChild = (count($item->children()) > 0)?true:false; if( ! $hasChild) { $put_arr = array($item->getName(),$item); fputcsv($f, $put_arr ,',','"'); } else { createCsv($item, $f); } } } ?>

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.30.0110.00718.82
8.3.20.0180.00020.20
8.3.10.0110.00423.57
8.3.00.0000.00820.61
8.2.160.0100.01022.26
8.2.150.0070.01124.18
8.2.140.0040.01124.66
8.2.130.0060.01226.16
8.2.120.0080.00019.38
8.2.110.0110.00021.04
8.2.100.0090.00317.78
8.2.90.0000.00818.92
8.2.80.0050.00317.97
8.2.70.0070.00717.09
8.2.60.0080.00017.68
8.2.50.0000.00818.10
8.2.40.0000.00918.16
8.2.30.0040.00417.84
8.2.20.0000.00717.57
8.2.10.0000.00717.43
8.2.00.0040.00417.54
8.1.270.0090.00923.96
8.1.260.0070.01126.35
8.1.250.0090.00628.09
8.1.240.0060.00322.11
8.1.230.0070.00417.76
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.23
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0030.00518.48
8.1.160.0030.00621.93
8.1.150.0000.00718.50
8.1.140.0070.00017.35
8.1.130.0000.00717.64
8.1.120.0070.00017.27
8.1.110.0030.00317.26
8.1.100.0050.00217.15
8.1.90.0000.00717.25
8.1.80.0060.00317.27
8.1.70.0000.00717.23
8.1.60.0060.00317.48
8.1.50.0080.00017.33
8.1.40.0000.00717.43
8.1.30.0030.00617.54
8.1.20.0040.00417.52
8.1.10.0000.00717.50
8.1.00.0000.00717.24
8.0.300.0090.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0030.00317.29
8.0.260.0070.00016.66
8.0.250.0000.00716.76
8.0.240.0000.00716.79
8.0.230.0000.00816.73
8.0.220.0000.00716.75
8.0.210.0040.00416.79
8.0.200.0000.00716.86
8.0.190.0000.00816.84
8.0.180.0000.00916.70
8.0.170.0050.00316.82
8.0.160.0060.00316.65
8.0.150.0040.00416.75
8.0.140.0040.00416.77
8.0.130.0030.00313.54
8.0.120.0000.00816.63
8.0.110.0000.00716.71
8.0.100.0000.00716.55
8.0.90.0040.00416.66
8.0.80.0080.00816.79
8.0.70.0080.00016.73
8.0.60.0040.00416.73
8.0.50.0000.00816.79
8.0.30.0100.00917.03
8.0.20.0100.00817.40
8.0.10.0000.00716.91
8.0.00.0100.00916.70
7.4.330.0050.00015.02
7.4.320.0070.00016.46
7.4.300.0000.00616.36
7.4.290.0070.00416.47
7.4.280.0000.00716.33
7.4.270.0030.00316.48
7.4.260.0000.01016.31
7.4.250.0030.00516.34
7.4.240.0040.00416.43
7.4.230.0030.00316.35
7.4.220.0030.01216.31
7.4.210.0080.00716.50
7.4.200.0000.00816.53
7.4.190.0030.00516.64
7.4.160.0150.00016.18
7.4.150.0110.00617.40
7.4.140.0080.01017.86
7.4.130.0060.01116.41
7.4.120.0060.01116.43
7.4.110.0160.00016.20
7.4.100.0160.00616.20
7.4.90.0100.00716.48
7.4.80.0140.00616.18
7.4.70.0090.00916.34
7.4.60.0080.00816.43
7.4.50.0000.00416.30
7.4.40.0060.00922.77
7.4.30.0180.00316.62
7.4.00.0100.00814.81
7.3.330.0000.00613.65
7.3.320.0020.00213.45
7.3.310.0000.00816.18
7.3.300.0030.00315.99
7.3.290.0060.00716.20
7.3.280.0090.00616.13
7.3.270.0120.00617.40
7.3.260.0120.00316.14
7.3.250.0100.01216.35
7.3.240.0090.00916.11
7.3.230.0120.00416.39
7.3.210.0060.01016.36
7.3.200.0090.00919.39
7.3.190.0100.01016.48
7.3.180.0090.00616.29
7.3.170.0060.00916.27
7.3.160.0080.01216.19
7.3.120.0080.01114.86
7.3.110.0080.00814.82
7.3.100.0040.00914.52
7.3.90.0070.00514.59
7.3.80.0060.00814.71
7.3.70.0080.00514.67
7.3.60.0050.00914.68
7.3.50.0030.01014.61
7.3.40.0030.01014.52
7.3.30.0090.00514.63
7.3.20.0090.00616.47
7.3.10.0050.01216.37
7.3.00.0080.00416.67
7.2.330.0120.00616.48
7.2.320.0070.01016.46
7.2.310.0070.01016.55
7.2.300.0070.01016.55
7.2.290.0040.01116.51
7.2.250.0050.01214.81
7.2.240.0090.00715.02
7.2.230.0080.00814.71
7.2.220.0060.00514.86
7.2.210.0080.00714.99
7.2.200.0050.01214.87
7.2.190.0060.00914.88
7.2.180.0050.00914.92
7.2.170.0070.00714.81
7.2.60.0130.00016.81
7.2.00.0060.00619.52
7.1.330.0080.00515.63
7.1.320.0070.00715.43
7.1.310.0050.01015.65
7.1.300.0070.00415.59
7.1.290.0040.00715.69
7.1.280.0060.00415.66
7.1.270.0070.00815.56
7.1.260.0050.00815.69
7.1.200.0120.00315.75
7.1.100.0070.00718.71
7.1.70.0000.00717.33
7.1.60.0130.01019.32
7.1.50.0040.01617.14
7.1.00.0030.07022.33
7.0.200.0100.00317.07
7.0.140.0030.07322.12
7.0.80.0070.09019.91
7.0.70.0170.05719.91
7.0.60.0070.04020.00
7.0.50.0070.06020.28
7.0.40.0070.08320.09
7.0.30.0130.08019.92
7.0.20.0100.03720.18
7.0.10.0100.07320.18
7.0.00.0170.07320.09
5.6.280.0070.07021.07
5.6.230.0200.05320.74
5.6.220.0070.08320.65
5.6.210.0030.05320.48
5.6.200.0100.06721.05
5.6.190.0100.08321.09
5.6.180.0070.07321.04
5.6.170.0030.05721.03
5.6.160.0100.06020.96
5.6.150.0070.04021.08
5.6.140.0000.09320.95
5.6.130.0070.08021.02
5.6.120.0130.08021.01
5.6.110.0170.07021.03
5.6.100.0070.07021.05
5.6.90.0070.07320.94
5.6.80.0130.06020.53
5.6.70.0030.08020.43
5.6.60.0100.08020.48
5.6.50.0070.08020.37
5.6.40.0030.08020.48
5.6.30.0070.08720.45
5.6.20.0170.07020.31
5.6.10.0130.04720.44
5.6.00.0030.08020.36
5.5.370.0100.07720.36
5.5.360.0130.04020.52
5.5.350.0070.04020.44
5.5.340.0070.08020.85
5.5.330.0170.04720.86
5.5.320.0100.07320.92
5.5.310.0100.04020.86
5.5.300.0070.08020.88
5.5.290.0030.08720.90
5.5.280.0030.04320.77
5.5.270.0130.08020.82
5.5.260.0070.05320.89
5.5.250.0100.07720.74
5.5.240.0030.08320.22
5.5.230.0070.07720.19
5.5.220.0070.05020.18
5.5.210.0030.07020.21
5.5.200.0030.07320.16
5.5.190.0100.07720.23
5.5.180.0070.06720.14
5.5.160.0070.07720.14
5.5.150.0070.08020.09
5.5.140.0030.05020.08
5.5.130.0070.08320.18
5.5.120.0070.06720.23
5.5.110.0130.06720.13
5.5.100.0070.07319.95
5.5.90.0130.07020.08
5.5.80.0100.06720.02
5.5.70.0030.07320.10
5.5.60.0100.07320.10
5.5.50.0070.06020.08
5.5.40.0130.06720.07
5.5.30.0100.07720.04
5.5.20.0170.06320.14
5.5.10.0170.06320.03
5.5.00.0070.08020.11
5.4.450.0100.08319.45
5.4.440.0030.04719.45
5.4.430.0030.04719.41
5.4.420.0030.08019.17
5.4.410.0100.08019.40
5.4.400.0030.08018.91
5.4.390.0030.07319.03
5.4.380.0030.04719.07
5.4.370.0070.06719.09
5.4.360.0030.08019.21
5.4.350.0230.06018.85
5.4.340.0100.06319.14
5.4.320.0130.05719.20
5.4.310.0100.07019.14
5.4.300.0030.05019.03
5.4.290.0100.05018.89
5.4.280.0000.06019.16
5.4.270.0070.07319.18
5.4.260.0070.07019.09
5.4.250.0000.06319.08
5.4.240.0130.07719.20
5.4.230.0230.05719.11
5.4.220.0070.05319.20
5.4.210.0070.04719.22
5.4.200.0100.05019.13
5.4.190.0130.04319.04
5.4.180.0130.06719.20
5.4.170.0130.07319.14
5.4.160.0000.05719.25
5.4.150.0100.07019.03
5.4.140.0100.07316.45
5.4.130.0070.07716.40
5.4.120.0130.06716.42
5.4.110.0070.05016.32
5.4.100.0070.07316.39
5.4.90.0030.05716.27
5.4.80.0170.06316.45
5.4.70.0000.04716.34
5.4.60.0100.04716.39
5.4.50.0030.07016.47
5.4.40.0100.07016.53
5.4.30.0030.07016.48
5.4.20.0030.03716.48
5.4.10.0170.06016.47
5.4.00.0030.07715.79
5.3.290.0070.08014.63
5.3.280.0100.07314.41
5.3.270.0000.08314.45
5.3.260.0100.07714.43
5.3.250.0100.06314.46
5.3.240.0030.07314.59
5.3.230.0130.05314.47
5.3.220.0070.07314.50
5.3.210.0070.07014.47
5.3.200.0070.04014.41
5.3.190.0070.07314.52
5.3.180.0000.07314.52
5.3.170.0030.07014.54
5.3.160.0070.07714.55
5.3.150.0170.06014.46
5.3.140.0170.06714.48
5.3.130.0030.08014.52
5.3.120.0170.04314.45
5.3.110.0000.04714.40
5.3.100.0070.07714.02
5.3.90.0070.05713.98
5.3.80.0030.08313.95
5.3.70.0130.07313.76
5.3.60.0070.05713.86
5.3.50.0100.07313.71
5.3.40.0170.03013.85
5.3.30.0100.06313.81
5.3.20.0030.06713.68
5.3.10.0070.07013.66
5.3.00.0170.05313.59
5.2.170.0100.04710.93
5.2.160.0030.06311.13
5.2.150.0030.03711.08
5.2.140.0100.06311.18
5.2.130.0030.06310.94
5.2.120.0030.06710.89
5.2.110.0100.02711.08
5.2.100.0030.03710.94
5.2.90.0030.04711.04
5.2.80.0030.06711.01
5.2.70.0030.06011.14
5.2.60.0000.06010.99
5.2.50.0030.05310.83
5.2.40.0000.04011.06
5.2.30.0030.04710.82
5.2.20.0070.05710.84
5.2.10.0100.04310.88
5.2.00.0030.04310.75
5.1.60.0070.05010.55
5.1.50.0070.05010.55
5.1.40.0070.04710.55
5.1.30.0100.05010.55
5.1.20.0000.04710.55
5.1.10.0070.05310.55
5.1.00.0030.02710.55
5.0.50.0030.05010.55
5.0.40.0000.04310.55
5.0.30.0030.06310.55
5.0.20.0070.04010.55
5.0.10.0030.04310.55
5.0.00.0000.07010.55
4.4.90.0000.03310.55
4.4.80.0030.03310.55
4.4.70.0030.03310.55
4.4.60.0000.03710.55
4.4.50.0070.03310.55
4.4.40.0070.05010.55
4.4.30.0000.03710.55
4.4.20.0000.03710.55
4.4.10.0000.03710.55
4.4.00.0030.05310.55
4.3.110.0000.03310.55
4.3.100.0070.02710.55
4.3.90.0070.03010.55
4.3.80.0100.02010.55
4.3.70.0100.02310.55
4.3.60.0000.02710.55
4.3.50.0000.03010.55
4.3.40.0000.05710.55
4.3.30.0000.03710.55
4.3.20.0000.02710.55
4.3.10.0030.03310.55
4.3.00.0000.03710.55

preferences:
42.08 ms | 401 KiB | 5 Q