3v4l.org

run code in 300+ PHP versions simultaneously
<?php // suppose some data is missing... function generateXML(){ $data = []; $data["height"]; $data["text"]="just a test"; // if generating the XML: $xml = "<template>"; $xml .= empty($data["height"])? "" : "<height>$data[height]</height><width>$data[height]</width>"; $xml .= empty($data["text"])? "" : "<text>$data[text]</text>"; $xml .= "</template>"; return $xml; } echo generateXML(); ?>

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.70.0120.00616.88
8.3.60.0030.01518.43
8.3.50.0070.00817.54
8.3.40.0150.00018.86
8.3.30.0120.00318.80
8.3.20.0040.00421.63
8.3.10.0040.00423.66
8.3.00.0040.00419.57
8.2.190.0080.00616.63
8.2.180.0110.00716.84
8.2.170.0120.00318.92
8.2.160.0160.00322.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.78
8.2.110.0000.01020.37
8.2.100.0160.00017.96
8.2.90.0080.00018.34
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0000.00818.22
8.2.50.0030.00618.10
8.2.40.0030.00620.64
8.2.30.0040.00419.30
8.2.20.0030.00618.14
8.2.10.0000.00718.16
8.2.00.0040.00418.07
8.1.280.0070.00725.92
8.1.270.0050.00224.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0080.00420.70
8.1.230.0070.00420.94
8.1.220.0060.00317.88
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0060.00317.10
8.1.180.0070.00018.68
8.1.170.0040.00418.51
8.1.160.0040.00418.86
8.1.150.0050.00320.27
8.1.140.0040.00417.56
8.1.130.0000.00818.93
8.1.120.0030.00517.30
8.1.110.0000.00817.40
8.1.100.0030.00617.43
8.1.90.0000.00817.44
8.1.80.0070.00017.30
8.1.70.0040.00417.29
8.1.60.0090.00017.59
8.1.50.0040.00417.50
8.1.40.0060.00617.41
8.1.30.0030.00617.61
8.1.20.0080.00017.64
8.1.10.0020.00517.61
8.1.00.0120.00017.49
8.0.300.0070.00019.82
8.0.290.0040.00416.75
8.0.280.0030.00318.45
8.0.270.0080.00017.26
8.0.260.0040.00416.76
8.0.250.0030.00316.99
8.0.240.0070.00016.96
8.0.230.0050.00316.95
8.0.220.0000.00716.83
8.0.210.0070.00016.84
8.0.200.0030.00317.01
8.0.190.0090.00317.00
8.0.180.0070.00016.98
8.0.170.0040.00416.95
8.0.160.0070.00016.90
8.0.150.0030.00316.87
8.0.140.0070.00016.89
8.0.130.0060.00013.39
8.0.120.0080.00016.89
8.0.110.0040.00416.78
8.0.100.0020.00517.02
8.0.90.0050.00216.94
8.0.80.0070.00716.89
8.0.70.0040.00416.85
8.0.60.0040.00416.91
8.0.50.0030.00516.82
8.0.30.0090.00917.07
8.0.20.0110.01017.40
8.0.10.0000.00817.07
8.0.00.0130.00616.70
7.4.330.0000.00515.55
7.4.320.0060.00016.44
7.4.300.0000.00616.61
7.4.290.0030.00316.53
7.4.280.0030.00616.61
7.4.270.0030.00316.61
7.4.260.0030.00316.54
7.4.250.0000.00716.49
7.4.240.0000.00716.50
7.4.230.0050.00216.44
7.4.220.0000.00816.41
7.4.210.0100.00616.63
7.4.200.0000.00716.25
7.4.160.0110.00616.54
7.4.140.0100.00917.86
7.4.130.0180.00316.44
7.4.120.0130.00616.61
7.4.110.0080.00816.59
7.4.100.0150.00316.41
7.4.90.0090.01116.46
7.4.80.0070.01019.39
7.4.70.0040.01216.51
7.4.60.0080.00816.46
7.4.50.0000.01716.57
7.4.40.0130.00316.59
7.4.10.0080.00814.80
7.4.00.0090.00615.13
7.3.330.0000.00613.43
7.3.320.0030.00313.20
7.3.310.0070.00016.46
7.3.300.0030.00316.29
7.3.290.0080.01016.40
7.3.280.0100.00616.41
7.3.260.0130.00616.50
7.3.240.0090.01016.38
7.3.230.0040.01316.32
7.3.210.0100.01316.43
7.3.200.0110.01116.50
7.3.190.0040.01216.43
7.3.180.0060.00916.56
7.3.170.0070.01016.55
7.3.160.0060.00916.40
7.3.130.0040.01115.03
7.3.120.0070.01014.47
7.3.110.0120.00614.88
7.3.100.0090.00614.91
7.3.90.0040.01114.79
7.3.80.0070.00314.63
7.3.70.0000.01714.78
7.3.60.0060.00614.66
7.3.50.0100.00314.82
7.3.40.0030.00614.57
7.3.30.0040.01114.86
7.3.20.0030.01016.71
7.3.10.0060.00616.64
7.3.00.0050.00916.74
7.2.330.0090.00916.75
7.2.320.0090.00916.68
7.2.310.0070.01016.45
7.2.300.0100.00616.54
7.2.290.0110.01116.61
7.2.260.0000.01614.86
7.2.250.0100.00714.96
7.2.240.0110.00414.89
7.2.230.0070.00715.02
7.2.220.0040.01414.82
7.2.210.0100.00314.97
7.2.200.0000.00915.19
7.2.190.0090.00614.84
7.2.180.0040.00814.78
7.2.170.0080.00414.97
7.2.160.0070.00714.79
7.2.150.0130.00316.64
7.2.140.0000.01416.82
7.2.130.0050.01116.89
7.2.120.0080.00416.85
7.2.110.0070.00716.79
7.2.100.0050.00516.94
7.2.90.0050.00916.79
7.2.80.0110.00316.85
7.2.70.0060.00716.64
7.2.60.0040.00616.81
7.2.50.0040.00616.97
7.2.40.0050.00717.04
7.2.30.0040.00716.92
7.2.20.0070.01017.88
7.2.10.0080.00617.83
7.2.00.0050.01217.85
7.1.330.0070.00415.93
7.1.320.0090.00015.84
7.1.310.0110.00315.85
7.1.300.0040.01115.92
7.1.290.0110.00415.53
7.1.280.0050.00215.80
7.1.270.0030.01015.89
7.1.260.0040.00715.80
7.1.250.0030.00615.77
7.1.240.0120.00315.91
7.1.230.0030.01015.80
7.1.220.0030.00515.93
7.1.210.0060.00615.97
7.1.200.0080.00815.78
7.1.190.0030.01015.69
7.1.180.0090.00315.71
7.1.170.0090.00615.68
7.1.160.0030.00715.68
7.1.150.0040.00715.57
7.1.140.0050.00717.26
7.1.130.0070.00617.21
7.1.120.0070.00517.20
7.1.110.0100.00617.08
7.1.100.0100.00516.83
7.1.90.0050.00816.88
7.1.80.0040.01117.07
7.1.70.0050.01116.51
7.1.60.0190.00625.50
7.1.50.0150.00825.38
7.1.40.0150.00925.11
7.1.30.0190.01125.04
7.1.20.0160.01525.16
7.1.10.0060.00916.19
7.1.00.0050.00916.18
7.0.330.0080.00315.24
7.0.320.0050.00515.30
7.0.310.0030.00615.37
7.0.300.0100.00315.47
7.0.290.0060.00615.32
7.0.280.0000.01515.40
7.0.270.0040.01115.30
7.0.260.0060.01215.23
7.0.250.0120.00615.48
7.0.240.0000.01215.34
7.0.230.0040.00815.08
7.0.220.0030.01315.51
7.0.210.0040.00815.48
7.0.200.0060.00915.56
7.0.190.0100.00315.39
7.0.180.0000.01015.30
7.0.170.0100.00615.59
7.0.160.0090.00015.30
7.0.150.0090.00315.52
7.0.140.0110.00415.29
7.0.130.0120.00315.43
7.0.120.0030.00915.37
7.0.110.0050.00515.09
7.0.100.0090.00315.13
7.0.90.0100.00315.54
7.0.80.0070.01115.37
7.0.70.0030.01215.47
7.0.60.0090.00615.25
7.0.50.0030.01015.44
7.0.40.0060.00613.53
7.0.30.0060.01013.34
7.0.20.0090.00013.63
7.0.10.0000.01413.25
7.0.00.0090.00413.13
5.6.400.0120.00414.61
5.6.390.0070.00314.85
5.6.380.0030.00914.47
5.6.370.0030.00714.55
5.6.360.0080.01114.08
5.6.350.0060.00614.63
5.6.340.0070.00714.32
5.6.330.0060.01214.68
5.6.320.0030.01514.51
5.6.310.0130.00314.53
5.6.300.0070.00714.60
5.6.290.0060.00614.44
5.6.280.0060.01014.45
5.6.270.0070.01014.63
5.6.260.0000.01214.54
5.6.250.0060.00814.42
5.6.240.0040.01114.21
5.6.230.0110.00714.46
5.6.220.0000.01914.60
5.6.210.0090.00914.59
5.6.200.0150.00014.24
5.6.190.0090.00614.31
5.6.180.0130.00314.38
5.6.170.0110.00714.46
5.6.160.0030.01314.44
5.6.150.0030.01014.80
5.6.140.0070.01014.21
5.6.130.0030.00614.58
5.6.120.0030.01014.53
5.6.110.0090.00614.28
5.6.100.0000.01214.35
5.6.90.0110.00414.21
5.6.80.0060.00614.42
5.6.70.0000.01014.25
5.6.60.0060.00314.20
5.6.50.0080.00014.09
5.6.40.0030.01014.36
5.6.30.0070.00314.07
5.6.20.0070.00314.50
5.6.10.0060.00614.33
5.6.00.0070.00414.16

preferences:
45.71 ms | 401 KiB | 5 Q