3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new XMLWriter(); $xml->openMemory(); echo "Does not work" . PHP_EOL; $xml->startElement('parent'); $xml->startElement('child'); $xml->endElement(); $xml->writeAttribute('parentAttribute', 'a value'); $xml->endElement(); echo $xml->outputMemory() . PHP_EOL; echo "Works" . PHP_EOL; $xml2 = new XMLWriter(); $xml2->openMemory(); $xml2->startElement('parent'); $xml2->writeAttribute('parentAttribute', 'a value'); $xml2->writeElement('child'); $xml2->endElement(); echo $xml2->outputMemory();

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.0070.00717.00
8.3.50.0120.00316.60
8.3.40.0070.00718.97
8.3.30.0090.00618.97
8.3.20.0040.00420.29
8.3.10.0080.00023.73
8.3.00.0000.00819.48
8.2.180.0160.00018.40
8.2.170.0140.00322.96
8.2.160.0030.01020.55
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0050.00222.26
8.2.120.0000.00826.35
8.2.110.0060.00322.27
8.2.100.0090.00318.16
8.2.90.0040.00419.48
8.2.80.0000.00818.16
8.2.70.0000.00817.75
8.2.60.0030.00517.93
8.2.50.0000.00818.18
8.2.40.0080.00022.44
8.2.30.0040.00421.27
8.2.20.0040.00418.30
8.2.10.0000.00818.24
8.2.00.0040.00418.02
8.1.280.0150.00625.92
8.1.270.0040.00424.09
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00024.10
8.1.230.0070.00417.83
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0060.00317.38
8.1.190.0050.00517.48
8.1.180.0060.00318.10
8.1.170.0080.00018.77
8.1.160.0050.00319.24
8.1.150.0000.00720.78
8.1.140.0040.00419.65
8.1.130.0000.00719.14
8.1.120.0030.00417.59
8.1.110.0060.00317.64
8.1.100.0050.00317.68
8.1.90.0080.00317.56
8.1.80.0040.00417.57
8.1.70.0000.00717.54
8.1.60.0000.00817.66
8.1.50.0030.00617.66
8.1.40.0040.00417.67
8.1.30.0040.00417.76
8.1.20.0040.00417.75
8.1.10.0000.00817.68
8.1.00.0080.00017.68
8.0.300.0000.00718.77
8.0.290.0050.00217.00
8.0.280.0030.00318.69
8.0.270.0040.00417.45
8.0.260.0060.00016.98
8.0.250.0000.00617.06
8.0.240.0000.00817.08
8.0.230.0110.00017.01
8.0.220.0050.00217.04
8.0.210.0000.00717.03
8.0.200.0030.00317.05
8.0.190.0030.00617.06
8.0.180.0000.01116.99
8.0.170.0000.00717.04
8.0.160.0070.00016.98
8.0.150.0080.00016.93
8.0.140.0000.00817.02
8.0.130.0030.00313.46
8.0.120.0020.00516.89
8.0.110.0020.00517.11
8.0.100.0040.00417.15
8.0.90.0030.00517.13
8.0.80.0060.00917.20
8.0.70.0000.00716.77
8.0.60.0040.00416.88
8.0.50.0000.00717.04
8.0.30.0110.00917.27
8.0.20.0120.00717.40
8.0.10.0000.00717.10
8.0.00.0150.00216.82
7.4.330.0000.00515.55
7.4.320.0070.00016.58
7.4.300.0080.00016.62
7.4.290.0030.00316.68
7.4.280.0030.00616.68
7.4.270.0000.00816.78
7.4.260.0000.00513.34
7.4.250.0000.00816.56
7.4.240.0050.00216.70
7.4.230.0030.00316.58
7.4.220.0060.01216.49
7.4.210.0060.00816.66
7.4.200.0020.00516.62
7.4.160.0080.00816.55
7.4.150.0150.00617.40
7.4.140.0080.01117.86
7.4.130.0120.00616.61
7.4.120.0120.00816.67
7.4.110.0030.01416.67
7.4.100.0090.00916.50
7.4.90.0090.00916.74
7.4.80.0110.00519.39
7.4.70.0180.00316.68
7.4.60.0150.00016.55
7.4.50.0110.00416.64
7.4.40.0080.00816.75
7.4.30.0050.01116.63
7.4.00.0030.01214.96
7.3.330.0000.00513.17
7.3.320.0060.00013.20
7.3.310.0000.00716.41
7.3.300.0040.00416.30
7.3.290.0080.00816.42
7.3.280.0110.00916.38
7.3.270.0160.00317.40
7.3.260.0070.00916.48
7.3.250.0080.01316.63
7.3.240.0070.01216.46
7.3.230.0060.01116.59
7.3.210.0130.00316.46
7.3.200.0120.00616.23
7.3.190.0120.00316.77
7.3.180.0060.01016.66
7.3.170.0090.00616.52
7.3.160.0080.01416.32
7.3.10.0070.00316.32
7.3.00.0060.00616.66
7.2.330.0130.01316.77
7.2.320.0030.01316.80
7.2.310.0030.01316.60
7.2.300.0060.01816.64
7.2.290.0100.01016.88
7.2.130.0080.00816.93
7.2.120.0000.01016.39
7.2.110.0040.01116.78
7.2.100.0080.00016.48
7.2.90.0000.00816.50
7.2.80.0090.00016.75
7.2.70.0080.00816.83
7.2.60.0090.00516.91
7.2.50.0230.00316.87
7.2.40.0140.00716.56
7.2.30.0170.00316.63
7.2.20.0110.00616.79
7.2.10.0100.00616.52
7.2.00.0030.01017.95
7.1.250.0000.00815.59
7.1.200.0030.00815.70
7.1.100.0060.01118.02
7.1.70.0270.01315.37
7.1.60.3230.02033.30
7.1.50.3770.01332.91
7.1.40.0200.01732.46
7.1.30.0700.01732.51
7.1.20.0230.01732.63
7.1.10.1570.01314.91
7.1.00.3100.01014.91
7.0.200.3630.01714.70
7.0.190.0100.01015.12
7.0.180.0070.01314.50
7.0.170.0700.01314.55
7.0.160.0070.01314.55
7.0.150.0030.01314.53
7.0.140.2900.01714.70
7.0.130.0100.00714.73
7.0.120.4670.01714.66
7.0.110.0030.01714.57
7.0.100.0070.01014.54
7.0.90.0070.01014.48
7.0.80.0170.01314.57
7.0.70.0000.01714.50
7.0.60.2530.00314.55
7.0.50.0070.01314.62
7.0.40.1870.01314.50
7.0.30.1770.01014.79
7.0.20.2630.01314.62
7.0.10.2030.01014.90
7.0.00.2400.01014.73

preferences:
50.75 ms | 401 KiB | 5 Q