3v4l.org

run code in 300+ PHP versions simultaneously
<?php $y = '<extData> <Airpoints> <APCurrency>NZD</APCurrency> </Airpoints> <orderData> <order><orderId>3</orderId><orderTime>2014-10-23T02:51:48</orderTime><item><sku>130</sku><title>Chicken Sandwich</title><quantity>1</quantity><price>10.00</price><amount>10.00</amount></item><subtotal>10.00</subtotal><fee>0.00</fee><total>10.00</total><orderStatus>COMP</orderStatus></order><schema_version>2</schema_version> </orderData> </extData>>2014-A'; $x = '<extData> <orderData> <order><orderId>6</orderId><orderTime>2014-10-23T02:53:38</orderTime><item><sku>138</sku><title>Beef Pie</title><quantity>1</quantity><price>8.00</price><amount>8.00</amount></item><item><sku>138</sku><title>Beef Pie</title><quantity>-1</quantity><price>8.00</price><amount>-8.00</amount></item><subtotal>0.00</subtotal><fee>0.00</fee><total>0.00</total><orderStatus>COMP</orderStatus></order><schema_version>2</schema_version> </orderData> </extData><price>±'; if(preg_match('/<extData>(.*)<\/extData>/s',$y, $matches)) { $xml = simplexml_load_string($matches[0]); $code = $xml->xpath('//APCurrency'); var_dump($code->text); } //var_dump($matches);

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.00618.80
8.3.50.0120.00921.28
8.3.40.0070.00719.28
8.3.30.0060.00919.42
8.3.20.0080.00020.64
8.3.10.0060.00324.20
8.3.00.0040.00420.01
8.2.180.0060.01317.13
8.2.170.0110.00322.96
8.2.160.0100.00320.89
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.01120.75
8.2.110.0060.00322.62
8.2.100.0030.00918.27
8.2.90.0030.00518.13
8.2.80.0060.00318.30
8.2.70.0040.00418.30
8.2.60.0040.00418.28
8.2.50.0050.00318.10
8.2.40.0000.00820.85
8.2.30.0040.00418.41
8.2.20.0080.00018.15
8.2.10.0000.00718.39
8.2.00.0080.00018.37
8.1.280.0040.01125.92
8.1.270.0000.00822.47
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.32
8.1.230.0070.00419.48
8.1.220.0050.00318.15
8.1.210.0040.00418.77
8.1.200.0030.00617.63
8.1.190.0040.00417.60
8.1.180.0090.00018.10
8.1.170.0000.00818.89
8.1.160.0060.00322.39
8.1.150.0040.00419.24
8.1.140.0040.00418.03
8.1.130.0070.00019.62
8.1.120.0040.00418.00
8.1.110.0000.00817.76
8.1.100.0070.00017.75
8.1.90.0050.00317.74
8.1.80.0000.00718.00
8.1.70.0000.00717.77
8.1.60.0060.00318.10
8.1.50.0000.00817.83
8.1.40.0030.00517.94
8.1.30.0060.00318.08
8.1.20.0050.00318.11
8.1.10.0040.00418.05
8.1.00.0000.00818.11
8.0.300.0070.00020.33
8.0.290.0060.00317.13
8.0.280.0050.00218.74
8.0.270.0070.00017.56
8.0.260.0030.00617.22
8.0.250.0040.00417.35
8.0.240.0000.00717.55
8.0.230.0050.00217.55
8.0.220.0000.00717.26
8.0.210.0000.00717.35
8.0.200.0030.00317.48
8.0.190.0030.00617.34
8.0.180.0000.00717.51
8.0.170.0030.00517.43
8.0.160.0030.00517.40
8.0.150.0040.00417.21
8.0.140.0000.00717.41
8.0.130.0070.00013.87
8.0.120.0000.00917.41
8.0.110.0040.00417.25
8.0.100.0040.00417.39
8.0.90.0040.00417.36
8.0.80.0100.00717.36
8.0.70.0000.00717.27
8.0.60.0030.00517.46
8.0.50.0030.00517.23
8.0.30.0130.00617.57
8.0.20.0070.01317.80
8.0.10.0000.00817.39
8.0.00.0070.01117.42
7.4.330.0050.00015.02
7.4.320.0030.00317.07
7.4.300.0060.00017.13
7.4.290.0070.00017.03
7.4.280.0070.00317.12
7.4.270.0000.00717.00
7.4.260.0060.00317.01
7.4.250.0060.00317.09
7.4.240.0050.00217.04
7.4.230.0070.00016.99
7.4.220.0090.00917.17
7.4.210.0110.01117.15
7.4.200.0050.00216.89
7.4.160.0040.01517.08
7.4.150.0120.00617.40
7.4.140.0110.01217.86
7.4.130.0070.01117.09
7.4.120.0130.00517.11
7.4.110.0100.00716.94
7.4.100.0040.01416.97
7.4.90.0070.01017.05
7.4.80.0150.00519.39
7.4.70.0100.01217.09
7.4.60.0130.00917.02
7.4.50.0080.00016.95
7.4.40.0040.01817.09
7.4.30.0050.01416.97
7.4.00.0030.01215.30
7.3.330.0000.00713.56
7.3.320.0000.00513.70
7.3.310.0030.00316.75
7.3.300.0070.00016.71
7.3.290.0020.01316.78
7.3.280.0080.01016.79
7.3.270.0090.00917.40
7.3.260.0090.01617.10
7.3.250.0050.01216.81
7.3.240.0100.00616.75
7.3.230.0070.01017.12
7.3.210.0100.01016.84
7.3.200.0100.00619.39
7.3.190.0040.01516.96
7.3.180.0150.00316.86
7.3.170.0120.01216.89
7.3.160.0170.00016.79
7.2.330.0150.00916.76
7.2.320.0030.01516.93
7.2.310.0070.01016.98
7.2.300.0130.00317.06
7.2.290.0050.01216.94
7.2.80.0030.01016.74
7.2.60.0000.01417.03
7.2.00.0040.00719.79
7.1.200.0060.00616.31
7.1.100.0040.00418.64
7.1.70.0000.00817.57
7.1.60.0030.02119.11
7.1.50.0070.00717.39
7.1.00.0070.07322.68
7.0.200.0000.00717.18
7.0.140.0170.06322.22
7.0.60.0000.05020.11
7.0.50.0070.07318.08
7.0.40.0070.08720.42
7.0.30.0430.06720.23
7.0.20.0300.04720.39
7.0.10.0130.08020.46
7.0.00.0100.06020.42
5.6.280.0070.07021.10
5.6.210.0070.06320.77
5.6.200.0030.08318.37
5.6.190.0030.09320.92
5.6.180.0330.08020.56
5.6.170.0270.05020.67
5.6.160.0030.04320.69
5.6.150.0070.06318.39
5.6.140.0030.05318.42
5.6.130.0130.07718.42
5.6.120.0030.07321.26
5.6.110.0170.07721.27
5.6.100.0130.07721.25
5.6.90.0100.08321.24
5.6.80.0030.03720.66
5.6.70.4570.03720.64
5.5.350.0100.03720.56
5.5.340.0030.04018.17
5.5.330.0070.08320.29
5.5.320.0030.08320.54
5.5.310.0230.05720.55
5.5.300.0000.04318.19
5.5.290.0070.06018.17
5.5.280.0000.07721.09
5.5.270.0030.04021.14
5.5.260.0130.08021.08
5.5.250.0170.07320.77
5.5.240.0200.07320.33
5.4.450.0500.05019.72
5.4.440.0870.07319.73
5.4.430.0670.06319.49
5.4.420.0670.00019.66
5.4.410.0670.00019.55
5.4.400.0630.00019.33
5.4.390.0630.00019.28
5.4.380.0630.00019.15
5.4.370.0630.00019.23
5.4.360.0600.00019.28
5.4.350.0630.00019.16
5.4.340.0080.03612.20
5.4.320.0050.03812.69
5.4.310.0060.03712.68
5.4.300.0060.04212.69
5.4.290.0060.04212.68
5.4.280.0060.03712.59
5.4.270.0080.03312.58
5.4.260.0150.03412.59
5.4.250.0040.03812.59
5.4.240.0070.03412.59
5.4.230.0070.03712.58
5.4.220.0040.03812.58
5.4.210.0040.04012.57
5.4.200.0050.03712.58
5.4.190.0120.04112.57
5.4.180.0080.04112.57
5.4.170.0030.03912.59
5.4.160.0040.03712.58
5.4.150.0070.03412.58
5.4.140.0070.03512.26
5.4.130.0100.03012.25
5.4.120.0070.03812.21
5.4.110.0070.03912.20
5.4.100.0080.03712.21
5.4.90.0110.03512.21
5.4.80.0090.03612.21
5.4.70.0080.03712.20
5.4.60.0040.03512.20
5.4.50.0080.03212.20
5.4.40.0050.03512.19
5.4.30.0060.03812.19
5.4.20.0040.03612.19
5.4.10.0040.03712.18
5.4.00.0070.03611.67
5.3.290.0050.03912.96
5.3.280.0080.03912.88
5.3.270.0040.04312.89
5.3.260.0130.03112.90
5.3.250.0090.03712.90
5.3.240.0030.03912.89
5.3.230.0070.03512.89
5.3.220.0060.03712.86
5.3.210.0060.03812.86
5.3.200.0100.03312.86
5.3.190.0050.03912.86
5.3.180.0120.03012.86
5.3.170.0070.03712.86
5.3.160.0060.03712.86
5.3.150.0050.03712.86
5.3.140.0080.03712.85
5.3.130.0050.04112.84
5.3.120.0070.04112.84
5.3.110.0080.03812.84
5.3.100.0070.04712.32
5.3.90.0060.04012.31
5.3.80.0070.03412.30
5.3.70.0080.03312.30
5.3.60.0060.03512.29
5.3.50.0090.04312.23
5.3.40.0050.03712.23
5.3.30.0050.05112.20
5.3.20.0060.03511.97
5.3.10.0040.03611.94
5.3.00.0010.04911.93
5.2.170.0030.0339.42
5.2.160.0070.0279.43
5.2.150.0050.0319.42
5.2.140.0030.0349.42
5.2.130.0050.0359.38
5.2.120.0060.0279.38
5.2.110.0050.0319.39
5.2.100.0070.0379.38
5.2.90.0090.0349.38
5.2.80.0090.0289.38
5.2.70.0070.0309.38
5.2.60.0070.0309.33
5.2.50.0080.0329.29
5.2.40.0050.0349.28
5.2.30.0060.0329.26
5.2.20.0050.0319.25
5.2.10.0050.0299.16
5.2.00.0060.0289.02
5.1.60.0030.0268.31
5.1.50.0080.0278.30
5.1.40.0050.0238.29
5.1.30.0030.0288.63
5.1.20.0030.0288.65
5.1.10.0030.0278.38
5.1.00.0030.0268.15
5.0.50.0040.0196.85
5.0.40.0020.0206.71
5.0.30.0030.0316.52
5.0.20.0030.0196.50
5.0.10.0040.0186.47
5.0.00.0060.0276.47
4.4.90.0030.0144.78
4.4.80.0040.0264.76
4.4.70.0040.0144.76
4.4.60.0020.0154.75
4.4.50.0010.0164.77
4.4.40.0040.0234.71
4.4.30.0040.0194.76
4.4.20.0020.0164.84
4.4.10.0060.0164.85
4.4.00.0010.0254.76
4.3.110.0040.0224.67
4.3.100.0040.0194.66
4.3.90.0040.0174.63
4.3.80.0030.0274.58
4.3.70.0030.0184.63
4.3.60.0010.0154.62
4.3.50.0040.0214.63
4.3.40.0020.0244.53
4.3.30.0020.0163.29
4.3.20.0020.0153.26
4.3.10.0020.0223.22
4.3.00.0200.0207.28

preferences:
49.46 ms | 401 KiB | 5 Q