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->startAttribute('parentAttribute', 'a value'); $xml->endAttribute(); $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.0120.00316.88
8.3.50.0140.00016.30
8.3.40.0070.00719.00
8.3.30.0090.00618.72
8.3.20.0080.00020.46
8.3.10.0040.00423.66
8.3.00.0040.00419.60
8.2.180.0150.00318.79
8.2.170.0140.00422.96
8.2.160.0100.00320.43
8.2.150.0070.00025.66
8.2.140.0000.00724.66
8.2.130.0000.00822.24
8.2.120.0050.00326.35
8.2.110.0040.00420.47
8.2.100.0040.00718.15
8.2.90.0060.00318.33
8.2.80.0000.00817.97
8.2.70.0030.00518.05
8.2.60.0080.00018.16
8.2.50.0060.00318.10
8.2.40.0060.00322.32
8.2.30.0070.00020.86
8.2.20.0040.00418.13
8.2.10.0040.00417.99
8.2.00.0040.00418.01
8.1.280.0120.00925.92
8.1.270.0030.00624.01
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.39
8.1.230.0040.00820.97
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.36
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0040.00418.88
8.1.160.0070.00019.02
8.1.150.0000.00820.59
8.1.140.0040.00419.52
8.1.130.0030.00318.96
8.1.120.0040.00417.43
8.1.110.0040.00417.46
8.1.100.0040.00417.41
8.1.90.0000.01117.52
8.1.80.0070.00017.44
8.1.70.0070.00017.56
8.1.60.0040.00417.61
8.1.50.0050.00517.65
8.1.40.0000.00817.61
8.1.30.0060.00317.71
8.1.20.0050.00317.78
8.1.10.0030.00517.70
8.1.00.0000.00817.52
8.0.300.0040.00419.85
8.0.290.0050.00317.00
8.0.280.0000.00718.48
8.0.270.0000.00717.38
8.0.260.0030.00317.07
8.0.250.0030.00317.09
8.0.240.0030.00316.98
8.0.230.0080.00016.98
8.0.220.0070.00016.97
8.0.210.0030.00317.06
8.0.200.0070.00017.02
8.0.190.0030.00517.05
8.0.180.0000.00717.02
8.0.170.0050.00317.02
8.0.160.0050.00216.96
8.0.150.0070.00016.91
8.0.140.0070.00016.88
8.0.130.0060.00013.43
8.0.120.0040.00416.91
8.0.110.0040.00416.79
8.0.100.0040.00417.09
8.0.90.0070.00016.92
8.0.80.0090.00617.04
8.0.70.0000.00716.84
8.0.60.0050.00317.05
8.0.50.0070.00016.85
8.0.30.0080.00917.26
8.0.20.0110.00717.40
8.0.10.0000.00717.05
8.0.00.0100.00716.69
7.4.330.0000.00515.55
7.4.320.0050.00316.57
7.4.300.0040.00416.57
7.4.290.0040.00416.56
7.4.280.0040.00416.59
7.4.270.0020.00516.53
7.4.260.0050.00013.33
7.4.250.0000.00816.74
7.4.240.0050.00316.53
7.4.230.0000.00716.58
7.4.220.0270.00716.58
7.4.210.0090.00616.73
7.4.200.0030.00516.58
7.4.160.0130.00316.67
7.4.150.0110.00517.40
7.4.140.0090.00817.86
7.4.130.0080.01116.48
7.4.120.0070.01116.65
7.4.110.0080.00816.39
7.4.100.0100.01016.55
7.4.90.0120.00616.48
7.4.80.0070.01019.39
7.4.70.0100.00716.71
7.4.60.0110.00416.62
7.4.50.0100.00616.41
7.4.40.0040.01416.60
7.4.30.0030.01416.48
7.4.00.0090.00714.98
7.3.330.0000.00513.27
7.3.320.0000.00513.23
7.3.310.0070.00016.33
7.3.300.0000.00716.52
7.3.290.0040.01116.40
7.3.280.0070.01016.43
7.3.270.0200.00017.40
7.3.260.0080.01116.42
7.3.250.0070.01116.44
7.3.240.0090.00916.41
7.3.230.0130.00816.85
7.3.210.0060.01116.63
7.3.200.0060.01316.36
7.3.190.0210.00416.39
7.3.180.0070.00716.53
7.3.170.0120.00616.45
7.3.160.0110.00416.69
7.3.120.0060.01014.63
7.3.110.0110.00715.11
7.3.100.0000.01715.02
7.3.90.0070.00714.60
7.3.80.0080.00814.81
7.3.70.0120.00314.68
7.3.60.0030.01014.79
7.3.50.0070.01014.95
7.3.40.0040.01214.61
7.3.30.0060.00914.86
7.3.20.0070.00716.82
7.3.10.0070.00716.73
7.3.00.0110.00316.52
7.2.330.0150.00316.81
7.2.320.0120.00816.80
7.2.310.0040.01316.88
7.2.300.0160.00816.60
7.2.290.0090.00916.89
7.2.250.0060.00915.11
7.2.240.0030.01315.38
7.2.230.0000.01515.39
7.2.220.0060.00615.37
7.2.210.0040.00815.01
7.2.200.0060.00614.89
7.2.190.0060.00314.85
7.2.180.0000.00915.19
7.2.170.0030.01015.21
7.2.00.0070.00719.05
7.1.330.0030.01015.68
7.1.320.0000.01115.89
7.1.310.0000.01515.85
7.1.300.0000.01315.75
7.1.290.0040.00715.94
7.1.280.0060.00815.73
7.1.270.0040.01115.60
7.1.260.0000.01315.71
7.1.100.0040.01117.79
7.1.70.2170.01315.30
7.1.60.1400.01733.01
7.1.50.0330.01733.04
7.1.40.0330.01732.74
7.1.30.1130.01732.61
7.1.20.0670.02032.72
7.1.10.0030.01314.79
7.1.00.0070.01014.81
7.0.200.0070.01014.79
7.0.190.0330.01714.87
7.0.180.2670.01314.59
7.0.170.0300.01314.68
7.0.160.3230.01714.46
7.0.150.1130.01014.54
7.0.140.3430.01314.71
7.0.130.0930.01314.63
7.0.120.0100.00714.85
7.0.110.0270.01314.56
7.0.100.3630.01314.50
7.0.90.1300.00714.50
7.0.80.3200.01714.66
7.0.70.0530.01314.60
7.0.60.4230.01014.29
7.0.50.3970.01314.63
7.0.40.3700.02014.76
7.0.30.3530.01714.86
7.0.20.3930.01014.90
7.0.10.3130.00714.60
7.0.00.3130.01314.84

preferences:
50.83 ms | 401 KiB | 5 Q