3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source https://bugs.php.net/bug.php?id=62328 class UberSimpleXML extends SimpleXMLElement { public function __toString() { return 'stringification'; } } $xml = new UberSimpleXML('<xml/>'); $xml->tag = "stuff"; echo "\nno cast: ". $xml; echo "\ncast: ". (string)$xml; echo "\nexplicit call:". $xml->__toString(); var_dump((string) $xml); var_dump($xml->__toString());

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.0090.00616.75
8.3.50.0070.01216.65
8.3.40.0090.00618.78
8.3.30.0070.00718.97
8.3.20.0000.00818.89
8.3.10.0060.00320.83
8.3.00.0040.00419.38
8.2.180.0060.01216.63
8.2.170.0120.00922.96
8.2.160.0100.00321.32
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.02
8.2.110.0060.00321.36
8.2.100.0040.00718.03
8.2.90.0000.00819.30
8.2.80.0030.00517.97
8.2.70.0110.00017.86
8.2.60.0060.00318.05
8.2.50.0030.00618.10
8.2.40.0080.00018.28
8.2.30.0040.00418.32
8.2.20.0000.00717.93
8.2.10.0080.00017.86
8.2.00.0060.00717.93
8.1.280.0140.00725.92
8.1.270.0050.00224.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00921.49
8.1.230.0090.00318.01
8.1.220.0080.00017.91
8.1.210.0030.00618.77
8.1.200.0030.00617.48
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0040.00420.83
8.1.160.0000.00719.15
8.1.150.0040.00418.76
8.1.140.0070.00017.65
8.1.130.0000.00718.04
8.1.120.0000.00817.51
8.1.110.0040.00417.64
8.1.100.0050.00317.55
8.1.90.0040.00417.60
8.1.80.0040.00417.58
8.1.70.0030.00317.59
8.1.60.0030.00617.80
8.1.50.0040.00417.74
8.1.40.0030.00617.63
8.1.30.0000.00817.81
8.1.20.0000.01317.79
8.1.10.0050.00317.75
8.1.00.0000.00817.56
8.0.300.0060.00319.40
8.0.290.0040.00416.88
8.0.280.0030.00318.64
8.0.270.0070.00017.45
8.0.260.0000.00716.85
8.0.250.0000.00817.03
8.0.240.0070.00317.06
8.0.230.0040.00417.17
8.0.220.0070.00017.17
8.0.210.0030.00316.98
8.0.200.0000.00617.15
8.0.190.0040.00417.05
8.0.180.0040.00417.04
8.0.170.0030.00616.97
8.0.160.0000.00717.16
8.0.150.0040.00416.86
8.0.140.0040.00416.95
8.0.130.0030.00313.49
8.0.120.0040.00416.97
8.0.110.0040.00417.14
8.0.100.0040.00417.04
8.0.90.0070.00017.05
8.0.80.0140.00716.93
8.0.70.0000.00717.11
8.0.60.0050.00216.96
8.0.50.0040.00416.93
8.0.30.0050.01617.51
8.0.20.0090.01117.40
8.0.10.0030.00517.06
8.0.00.0130.00917.13
7.4.330.0000.00513.14
7.4.320.0000.00616.62
7.4.300.0000.00616.56
7.4.290.0050.00316.79
7.4.280.0080.00116.58
7.4.270.0070.00016.83
7.4.260.0000.00513.45
7.4.250.0060.00316.64
7.4.240.0030.00316.72
7.4.230.0000.00716.59
7.4.220.0030.01616.51
7.4.210.0070.00916.77
7.4.200.0040.00416.62
7.4.190.0070.00016.92
7.4.160.0090.01216.62
7.4.150.0090.00916.57
7.4.140.0110.00916.69
7.4.130.0130.00316.55
7.4.120.0120.00516.73
7.4.110.0030.01316.82
7.4.100.0130.00316.78
7.4.90.0040.01216.84
7.4.80.0110.01016.57
7.4.70.0100.00616.73
7.4.60.0070.01316.84
7.4.50.0030.00616.80
7.4.40.0060.00616.61
7.4.30.0100.00716.52
7.4.00.0030.01014.95
7.3.330.0000.00613.47
7.3.320.0030.00313.52
7.3.310.0080.00016.36
7.3.300.0040.00416.46
7.3.290.0060.00916.47
7.3.280.0120.00616.46
7.3.270.0090.00916.65
7.3.260.0080.01316.77
7.3.250.0150.01016.60
7.3.240.0120.01216.79
7.3.230.0150.00616.66
7.3.210.0120.00616.70
7.3.200.0090.00919.39
7.3.190.0070.01016.61
7.3.180.0060.01016.72
7.3.170.0150.00716.55
7.3.160.0100.00516.46
7.3.120.0110.00414.95
7.2.330.0090.00916.96
7.2.320.0100.01116.92
7.2.310.0150.00416.60
7.2.300.0080.00816.78
7.2.290.0170.00016.98
7.2.60.0070.00716.95
7.2.00.0040.00819.74
7.1.200.0060.00315.83
7.1.100.0000.01417.91
7.1.70.0030.00717.24
7.1.60.0070.01419.40
7.1.50.0030.00917.07
7.1.00.0070.07322.50
7.0.200.0330.00914.52
7.0.140.0030.07322.08
7.0.120.0000.07722.14
7.0.60.0030.04720.09
7.0.50.0170.04017.86
7.0.40.0130.08020.11
7.0.30.0530.06320.37
7.0.20.0270.07720.26
7.0.10.0300.05320.36
7.0.00.0030.04320.29
5.6.280.0030.07320.88
5.6.210.0070.07320.52
5.6.200.0030.05318.36
5.6.190.0100.08320.59
5.6.180.0300.06020.81
5.6.170.0330.05320.60
5.6.160.0100.08020.57
5.6.150.0000.08018.19
5.6.140.0100.06018.18
5.6.130.0000.07718.32
5.6.120.0070.08321.19
5.6.110.0130.08721.04
5.6.100.0130.07721.20
5.6.90.0000.06321.17
5.6.80.0130.06020.52
5.6.70.3670.03320.57
5.5.350.0170.08020.55
5.5.340.0030.07718.15
5.5.330.0000.07320.35
5.5.320.0300.05720.40
5.5.310.0500.06020.38
5.5.300.0070.08317.98
5.5.290.0000.04718.08
5.5.280.0000.04720.81
5.5.270.0100.04020.82
5.5.260.0070.06320.77
5.5.250.0070.08320.82
5.5.240.0070.08320.33
5.4.450.0330.07319.64
5.4.440.3670.04019.64
5.4.430.0070.06019.51
5.4.420.0200.04319.41
5.4.410.0070.05719.54
5.4.400.0100.06019.23
5.4.390.0200.04319.31
5.4.380.0230.05018.82
5.4.370.0130.04018.51
5.4.360.0030.04018.80
5.4.350.0040.04012.13
5.4.340.0050.03612.13
5.4.320.0080.03912.61
5.4.310.0050.03912.61
5.4.300.0090.04512.61
5.4.290.0070.05012.61
5.4.280.0070.04112.51
5.4.270.0110.04512.51
5.4.260.0090.04812.51
5.4.250.0050.05012.50
5.4.240.0060.04512.51
5.4.230.0050.04512.50
5.4.220.0090.04112.50
5.4.210.0090.05312.50
5.4.200.0080.05012.50
5.4.190.0080.04512.50
5.4.180.0060.05012.50
5.4.170.0080.04712.51
5.4.160.0090.04212.51
5.4.150.0070.04212.50
5.4.140.0060.04512.18
5.4.130.0050.04512.17
5.4.120.0080.04312.13
5.4.110.0060.04512.13
5.4.100.0060.04212.13
5.4.90.0060.04612.13
5.4.80.0070.04212.13
5.4.70.0080.04112.12
5.4.60.0090.03912.12
5.4.50.0070.04212.12
5.4.40.0080.04012.11
5.4.30.0080.04012.10
5.4.20.0060.04612.10
5.4.10.0070.04012.10
5.4.00.0070.04111.59
5.3.290.0090.03712.87
5.3.280.0050.04712.80
5.3.270.0080.05012.81
5.3.260.0090.04512.81
5.3.250.0100.04312.81
5.3.240.0100.04312.81
5.3.230.0090.04912.80
5.3.220.0080.05112.77
5.3.210.0090.05012.77
5.3.200.0090.05312.77
5.3.190.0110.04512.77
5.3.180.0080.04912.77
5.3.170.0080.04912.77
5.3.160.0070.04912.77
5.3.150.0080.05012.77
5.3.140.0080.05012.76
5.3.130.0090.05412.75
5.3.120.0110.05512.75
5.3.110.0080.05312.75
5.3.100.0080.04712.24
5.3.90.0080.04712.22
5.3.80.0050.04612.21
5.3.70.0090.04712.21
5.3.60.0110.04412.20
5.3.50.0090.04812.14
5.3.40.0100.04112.14
5.3.30.0060.04712.11
5.3.20.0070.04311.88
5.3.10.0090.04911.86
5.3.00.0100.04811.84

preferences:
49.27 ms | 400 KiB | 5 Q