3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <data> <prod id="1"> <layer id="layer_0" imgSRC="data/361_layer_0.png"/> <layer id="layer_1" imgSRC="data/362_layer_0.png"/> <layer id="layer_2" imgSRC="data/363_layer_0.png"/> </prod> <prod id="2"> <layer id="layer_0" imgSRC="data/361_layer_0.png"/> <layer id="layer_1" imgSRC="data/362_layer_0.png"/> <layer id="layer_2" imgSRC="data/363_layer_0.png"/> </prod> </data> XML; $xml = simplexml_load_string($x); // assuming XML in $x $node = $xml->xpath("//prod[@id='2']/layer[@id='layer_2']")[0]; $new = $node->addChild("layer",""); $new->addAttribute("id", "layer_3"); var_dump ($xml);

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.0140.00717.13
8.3.50.0140.00716.89
8.3.40.0100.01019.04
8.3.30.0130.00319.09
8.3.20.0080.00019.02
8.3.10.0030.00619.07
8.3.00.0080.00819.76
8.2.180.0130.00317.00
8.2.170.0190.00322.96
8.2.160.0120.00321.64
8.2.150.0070.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00321.50
8.2.110.0100.00020.72
8.2.100.0090.00318.28
8.2.90.0030.00519.55
8.2.80.0040.00417.97
8.2.70.0000.00917.88
8.2.60.0040.00418.18
8.2.50.0000.00818.10
8.2.40.0040.00420.97
8.2.30.0000.00818.33
8.2.20.0000.00817.97
8.2.10.0040.00418.01
8.2.00.0080.00018.04
8.1.280.0100.01025.92
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0100.00023.19
8.1.230.0080.00317.92
8.1.220.0090.00017.91
8.1.210.0050.00318.77
8.1.200.0040.00417.61
8.1.190.0060.00317.48
8.1.180.0000.00818.10
8.1.170.0050.00318.96
8.1.160.0050.00222.32
8.1.150.0020.00518.87
8.1.140.0040.00417.70
8.1.130.0000.00818.02
8.1.120.0000.00717.82
8.1.110.0030.00517.75
8.1.100.0040.00417.55
8.1.90.0040.00417.86
8.1.80.0070.00017.85
8.1.70.0070.00017.78
8.1.60.0040.00417.71
8.1.50.0030.00517.62
8.1.40.0050.00317.84
8.1.30.0030.00518.02
8.1.20.0000.00818.05
8.1.10.0030.00517.74
8.1.00.0080.00017.91
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0040.00418.75
8.0.270.0040.00417.51
8.0.260.0000.00717.21
8.0.250.0000.00717.38
8.0.240.0020.00517.21
8.0.230.0040.00417.11
8.0.220.0030.00317.09
8.0.210.0050.00317.18
8.0.200.0060.00017.32
8.0.190.0040.00417.22
8.0.180.0020.00817.24
8.0.170.0080.00217.29
8.0.160.0050.00317.06
8.0.150.0000.00817.08
8.0.140.0040.00417.04
8.0.130.0050.00013.53
8.0.120.0040.00417.06
8.0.110.0030.00517.12
8.0.100.0000.00717.23
8.0.90.0050.00217.25
8.0.80.0060.00917.12
8.0.70.0000.00717.17
8.0.60.0080.00017.20
8.0.50.0000.00717.23
8.0.30.0150.00817.13
8.0.20.0100.01017.23
8.0.10.0040.00417.25
8.0.00.0130.01117.17
7.4.330.0050.00013.15
7.4.320.0000.00716.79
7.4.300.0060.00016.89
7.4.290.0080.00016.91
7.4.280.0040.00416.79
7.4.270.0000.00716.87
7.4.260.0000.00513.64
7.4.250.0000.00816.95
7.4.240.0020.00516.78
7.4.230.0000.00717.00
7.4.220.0060.01816.82
7.4.210.0070.00716.87
7.4.200.0060.00316.86
7.4.190.0000.00717.05
7.4.160.0080.01316.89
7.4.150.0250.00916.84
7.4.140.0170.01216.88
7.4.130.0090.01316.88
7.4.120.0120.00616.79
7.4.110.0190.00016.85
7.4.100.0160.00316.82
7.4.90.0150.00416.87
7.4.80.0120.00619.39
7.4.70.0100.01317.06
7.4.60.0070.01116.69
7.4.50.0080.00816.81
7.4.40.0070.01016.73
7.4.30.0110.00816.95
7.4.00.0070.00915.12
7.3.330.0030.00313.37
7.3.320.0030.00313.40
7.3.310.0030.00516.72
7.3.300.0040.00416.57
7.3.290.0090.01316.64
7.3.280.0090.00716.55
7.3.270.0080.01216.66
7.3.260.0150.00516.79
7.3.250.0100.01016.76
7.3.240.0130.00316.64
7.3.230.0150.00416.71
7.3.210.0100.00916.61
7.3.200.0080.01116.83
7.3.190.0150.00316.70
7.3.180.0130.00216.70
7.3.170.0150.00316.70
7.3.160.0090.00916.76
7.3.120.0060.00814.86
7.3.110.0030.01015.02
7.3.100.0070.01014.84
7.3.90.0030.01215.14
7.3.80.0080.00814.87
7.3.70.0000.01014.95
7.3.60.0150.00014.77
7.3.50.0030.01314.79
7.3.40.0100.01014.95
7.3.30.0000.01114.78
7.3.20.0040.00816.48
7.3.10.0080.00816.74
7.3.00.0100.00516.72
7.2.330.0090.00917.14
7.2.320.0060.01216.98
7.2.310.0130.01116.83
7.2.300.0030.01516.56
7.2.290.0170.00316.52
7.2.250.0030.01315.45
7.2.240.0070.01115.05
7.2.230.0060.00615.18
7.2.220.0070.01015.04
7.2.210.0090.00614.95
7.2.200.0030.00915.01
7.2.190.0120.00614.86
7.2.180.0030.00915.01
7.2.170.0030.01315.20
7.2.130.0190.00316.81
7.2.120.0050.00916.91
7.2.110.0050.01117.03
7.2.100.0100.00716.81
7.2.90.0110.00317.02
7.2.80.0070.00717.06
7.2.70.0140.00116.85
7.2.60.0090.00816.86
7.2.50.0050.01116.97
7.2.40.0090.01016.96
7.2.30.0090.00816.89
7.2.20.0080.00816.85
7.2.10.0050.00916.94
7.2.00.0200.00517.79
7.1.330.0060.00915.97
7.1.320.0000.01515.97
7.1.310.0090.00616.16
7.1.300.0060.00916.07
7.1.290.0000.01115.89
7.1.280.0060.00615.67
7.1.270.0070.00715.93
7.1.260.0040.01416.00
7.1.250.0120.00615.76
7.1.240.0140.01116.13
7.1.230.0120.00815.87
7.1.220.0160.00615.94
7.1.210.0110.00815.86
7.1.200.0100.00615.91
7.1.190.0060.01215.96
7.1.180.0000.01916.03
7.1.170.0080.01216.03
7.1.160.0090.00515.99
7.1.150.0060.01216.02
7.1.140.0030.01015.85
7.1.130.0040.00815.95
7.1.120.0090.00916.04
7.1.110.0060.00915.69
7.1.100.0050.00617.20
7.1.90.0120.00315.64
7.1.80.0050.00515.96
7.1.70.0060.00316.48
7.1.60.0050.01317.55
7.1.50.0200.00725.23
7.1.40.0120.00915.81
7.1.30.0070.00315.97
7.1.20.0080.00416.01
7.1.10.0070.00715.95
7.1.00.0040.02319.23
7.0.330.0160.00815.47
7.0.320.0030.01015.52
7.0.310.0060.00615.36
7.0.300.0070.00715.73
7.0.290.0030.01015.54
7.0.280.0040.00715.32
7.0.270.0040.00815.29
7.0.260.0110.00415.67
7.0.250.0060.00315.50
7.0.240.0150.00015.59
7.0.230.0080.00415.58
7.0.220.0040.01115.68
7.0.210.0040.00715.75
7.0.200.0070.00416.05
7.0.190.0000.01015.18
7.0.180.0080.00315.74
7.0.170.0000.01315.55
7.0.160.0080.00815.55
7.0.150.0030.01015.42
7.0.140.0020.04318.88
7.0.130.0000.00915.68
7.0.120.0070.04018.92
7.0.110.0000.00915.67
7.0.100.0030.00615.70
7.0.90.0080.00815.52
7.0.80.0090.00615.71
7.0.70.0080.00315.37
7.0.60.0050.02917.74
7.0.50.0060.04316.79
7.0.40.0080.04516.87
7.0.30.0220.03017.09
7.0.20.0130.04316.85
7.0.10.0080.04416.91
7.0.00.0130.04316.88
5.6.380.0060.00914.43
5.6.370.0040.01114.85
5.6.360.0120.00614.04
5.6.350.0080.00514.55
5.6.340.0100.00714.59
5.6.330.0060.00614.51
5.6.320.0030.01314.80
5.6.310.0030.00614.64
5.6.300.0080.00414.38
5.6.290.0060.00814.73
5.6.280.0020.04217.85
5.6.270.0060.00614.52
5.6.260.0030.00714.42
5.6.250.0040.00714.59
5.6.240.0040.01114.50
5.6.230.0030.01314.70
5.6.220.0100.00314.72
5.6.210.0050.04117.66
5.6.200.0050.03016.31
5.6.190.0020.05017.41
5.6.180.1800.02517.39
5.6.170.0200.03917.56
5.6.160.0050.04217.66
5.6.150.0050.04716.42
5.6.140.0050.04916.36
5.6.130.0130.04216.53
5.6.120.0070.02217.80
5.6.110.0080.03517.85
5.6.100.0050.04017.81
5.6.90.0070.04217.79
5.6.80.0050.04217.49
5.6.70.1820.02017.51
5.6.60.0030.00714.25
5.6.50.0140.00414.31
5.6.40.0030.00714.45
5.6.30.0000.01314.23
5.6.20.0030.01014.72
5.6.10.0080.00314.46
5.6.00.0000.01214.39
5.5.380.0030.00711.20
5.5.370.0050.00511.15
5.5.360.0110.00311.14
5.5.350.0010.02315.85
5.5.340.0050.02314.63
5.5.330.0070.04315.81
5.5.320.0150.04215.79
5.5.310.0170.03315.92
5.5.300.0080.03214.59
5.5.290.0080.04014.58
5.5.280.0030.02616.07
5.5.270.0080.02816.00
5.5.260.0050.02216.00
5.5.250.0000.04615.83
5.5.240.0050.03715.83
5.5.230.0040.00411.10
5.5.220.0030.00710.90
5.5.210.0020.00711.18
5.5.200.0040.00410.90
5.5.190.0080.00511.01
5.5.180.0070.00711.04
5.5.170.0100.00310.94
5.5.160.0070.00711.11
5.5.150.0030.00310.90
5.5.140.0090.00311.10
5.5.130.0000.01110.95
5.5.120.0030.00611.34
5.5.110.0110.00010.90
5.5.100.0070.00311.28
5.5.90.0030.00310.90
5.5.80.0040.00711.21
5.5.70.0030.00711.28
5.5.60.0060.00611.22
5.5.50.0080.00010.97
5.5.40.0030.00511.41
5.5.30.0060.00310.92
5.5.20.0140.00011.16
5.5.10.0060.00611.12
5.5.00.0070.00310.90
5.4.450.0080.04215.28
5.4.440.0100.04015.11
5.4.430.0090.02815.23
5.4.420.0100.03715.40
5.4.410.0110.03715.05
5.4.400.0020.04515.16
5.4.390.0090.02714.92
5.4.380.0120.03515.11
5.4.370.0040.04515.20
5.4.360.0090.02315.04
5.4.350.0080.03014.92
5.4.340.0100.03815.04
5.4.330.0080.00410.90
5.4.320.0040.02715.13
5.4.310.0080.04115.05
5.4.300.0060.02015.10
5.4.290.0080.04014.97
5.4.280.0100.03715.14
5.4.270.0020.03415.18
5.4.260.0070.03015.13
5.4.250.0090.02115.16
5.4.240.0090.03615.13
5.4.230.0050.04415.03
5.4.220.0050.03715.00
5.4.210.0070.02014.95
5.4.200.0030.03115.15
5.4.190.0050.02315.09
5.4.180.0100.04115.01
5.4.170.0030.02715.13
5.4.160.0070.02115.04
5.4.150.0000.04815.15
5.4.140.0050.04113.76
5.4.130.0030.04013.86
5.4.120.0060.03313.81
5.4.110.0030.03313.75
5.4.100.0030.03513.88
5.4.90.0030.04013.69
5.4.80.0050.02513.80
5.4.70.0050.03713.86
5.4.60.0130.03313.86
5.4.50.0070.03813.72
5.4.40.0030.02613.73
5.4.30.0100.04013.79
5.4.20.0060.03613.64
5.4.10.0070.03913.78
5.4.00.0070.03713.46
5.3.290.0050.02012.74
5.3.280.0100.03812.65
5.3.270.0030.03012.71
5.3.260.0020.02212.70
5.3.250.0050.03012.72
5.3.240.0080.03812.71
5.3.230.0100.03812.79
5.3.220.0020.03912.70
5.3.210.0020.04612.68
5.3.200.0060.04012.75
5.3.190.0050.02812.64
5.3.180.0030.03612.69
5.3.170.0030.04112.71
5.3.160.0020.03112.70
5.3.150.0070.02112.63
5.3.140.0060.03812.64
5.3.130.0020.03312.69
5.3.120.0040.04112.69
5.3.110.0070.04112.68
5.3.100.0100.02312.44
5.3.90.0120.03412.43
5.3.80.0100.03512.36
5.3.70.0050.03312.43
5.3.60.0040.04212.41
5.3.50.0040.02412.39
5.3.40.0070.03412.40
5.3.30.0030.02812.40
5.3.20.0050.02012.27
5.3.10.0050.01912.24
5.3.00.0050.02012.18
5.2.170.0060.02811.01
5.2.160.0040.03010.97
5.2.150.0030.01711.10
5.2.140.0020.01910.99
5.2.130.0000.01710.94
5.2.120.0050.01710.95
5.2.110.0070.01310.97
5.2.100.0060.01310.97
5.2.90.0060.01310.91
5.2.80.0040.01710.94
5.2.70.0000.01810.99
5.2.60.0000.02111.01
5.2.50.0050.01810.94
5.2.40.0030.01510.90
5.2.30.0020.01610.93
5.2.20.0030.01610.93
5.2.10.0020.01810.88
5.2.00.0040.01510.81
5.1.60.0040.01010.46
5.1.50.0000.01610.44
5.1.40.0020.01410.49
5.1.30.0010.01510.63
5.1.20.0010.01410.58
5.1.10.0020.01610.52
5.1.00.0020.01610.49
5.0.50.0020.0129.72
5.0.40.0050.0079.66
5.0.30.0030.0189.53
5.0.20.0030.0109.63
5.0.10.0000.0139.62
5.0.00.0050.0139.54
4.4.90.0020.0099.42
4.4.80.0000.0139.42
4.4.70.0050.0089.42
4.4.60.0000.0119.42
4.4.50.0020.0109.42
4.4.40.0020.0129.42
4.4.30.0020.0099.42
4.4.20.0020.0089.42
4.4.10.0030.0119.42
4.4.00.0010.0139.42
4.3.110.0000.0099.42
4.3.100.0050.0089.42
4.3.90.0020.0109.42
4.3.80.0000.0159.42
4.3.70.0030.0089.42
4.3.60.0020.0079.42
4.3.50.0000.0099.42
4.3.40.0020.0139.42
4.3.30.0000.0119.42
4.3.20.0020.0099.42
4.3.10.0020.0089.42
4.3.00.0030.0089.42

preferences:
57.26 ms | 400 KiB | 5 Q