3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0" encoding="UTF-8"?> <DATA> <sessionId>1073741(eA14011269142xC071</sessionId> <device_id></device_id> <sessionTime>1429457223</sessionTime> <trans_time>1429457223</trans_time> <mpb>1000</mpb> <user_id>1335</user_id> <user_name>ltt1835</user_name> <alias>Lotto8 陈</alias> <display_user_points>3999</display_user_points> <message>剩余积分不足, 请充值后再继续。</message> <transfer_points>0</transfer_points> <user_points>3999</user_points> <fund_status>100</fund_status> <Jackpot> <jackpot_amount>1582668</jackpot_amount> <jackpot_ceiling>10000</jackpot_ceiling> <jackpot_preserved>800000</jackpot_preserved> <message_front>总奖池目前已经高达</message_front> <message_mid>分,大奖随时开出,多玩多赢。</message_mid> <message_end></message_end> <message_top>两次开奖,奖上有奖,喜上加喜</message_top> </Jackpot> <card_number>1073741835</card_number> <status>1</status> </DATA>'; print_r( get_tag("status", 1, $str)); function get_tag( $attr, $value, $xml, $tag=null ) { if( is_null($tag) ) $tag = '\w+'; else $tag = preg_quote($tag); $attr = preg_quote($attr); $value = preg_quote($value); $tag_regex = "/<(".$tag.")[^>]*$attr\s*=\s*". "(['\"])$value\\2[^>]*>(.*?)<\/\\1>/"; preg_match_all($tag_regex, $xml, $matches, PREG_PATTERN_ORDER); return $matches[3]; } ?>

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.0040.01817.00
8.3.50.0150.01022.09
8.3.40.0040.01119.10
8.3.30.0070.00719.07
8.3.20.0080.00020.39
8.3.10.0080.00021.85
8.3.00.0040.00419.63
8.2.180.0090.01218.79
8.2.170.0080.01219.08
8.2.160.0030.01022.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0150.00019.90
8.2.110.0090.00019.20
8.2.100.0090.00317.75
8.2.90.0040.00419.17
8.2.80.0030.00517.97
8.2.70.0060.00317.75
8.2.60.0040.00718.05
8.2.50.0080.00318.07
8.2.40.0030.00718.05
8.2.30.0030.00618.16
8.2.20.0080.00017.95
8.2.10.0000.00718.22
8.2.00.0050.00318.05
8.1.280.0060.00925.92
8.1.270.0040.00418.97
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00623.82
8.1.230.0070.00417.61
8.1.220.0060.00317.79
8.1.210.0000.00918.77
8.1.200.0070.00317.60
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00420.55
8.1.160.0000.00722.06
8.1.150.0040.00418.96
8.1.140.0000.00717.59
8.1.130.0070.00017.85
8.1.120.0000.00817.65
8.1.110.0000.00717.70
8.1.100.0050.00317.65
8.1.90.0080.00017.64
8.1.80.0080.00017.67
8.1.70.0040.00417.64
8.1.60.0000.00917.74
8.1.50.0000.00817.62
8.1.40.0020.00517.69
8.1.30.0000.00817.79
8.1.20.0000.00917.71
8.1.10.0080.00017.66
8.1.00.0000.00817.54
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0040.00418.48
8.0.270.0080.00017.33
8.0.260.0000.00817.30
8.0.250.0030.00317.00
8.0.240.0000.00717.00
8.0.230.0040.00417.03
8.0.220.0030.00317.03
8.0.210.0040.00417.04
8.0.200.0050.00317.04
8.0.190.0050.00317.12
8.0.180.0080.00017.00
8.0.170.0000.00817.04
8.0.160.0040.00417.09
8.0.150.0000.00717.06
8.0.140.0050.00316.99
8.0.130.0000.00613.45
8.0.120.0060.00317.14
8.0.110.0060.00317.04
8.0.100.0040.00417.12
8.0.90.0030.00517.03
8.0.80.0180.00617.17
8.0.70.0000.00717.01
8.0.60.0000.00717.02
8.0.50.0000.00817.02
8.0.30.0110.01217.26
8.0.20.0100.01017.40
8.0.10.0070.00017.10
8.0.00.0110.00617.04
7.4.330.0000.00515.18
7.4.320.0060.00016.80
7.4.300.0090.00016.81
7.4.290.0000.00716.83
7.4.280.0030.00516.72
7.4.270.0030.00316.91
7.4.260.0060.00316.68
7.4.250.0070.00016.91
7.4.240.0050.00316.87
7.4.230.0000.00716.88
7.4.220.0090.00916.82
7.4.210.0070.00916.85
7.4.200.0050.00216.69
7.4.160.0150.00416.68
7.4.150.0120.00617.40
7.4.140.0130.00617.86
7.4.130.0090.00916.71
7.4.120.0080.00916.71
7.4.110.0090.01316.64
7.4.100.0060.01216.73
7.4.90.0130.00616.79
7.4.80.0070.01319.39
7.4.70.0100.00717.04
7.4.60.0120.00416.64
7.4.50.0030.00316.56
7.4.40.0080.00816.81
7.4.30.0060.01216.48
7.4.00.0130.00315.21
7.3.330.0060.00013.49
7.3.320.0040.00813.34
7.3.310.0030.00316.52
7.3.300.0040.00416.55
7.3.290.0030.00316.42
7.3.280.0090.01016.55
7.3.270.0270.02617.40
7.3.260.0090.00916.81
7.3.250.0060.01216.52
7.3.240.0070.01016.58
7.3.230.0030.01316.56
7.3.210.0060.01216.79
7.3.200.0030.01619.39
7.3.190.0070.01416.39
7.3.180.0100.01016.61
7.3.170.0140.00316.52
7.3.160.0130.00716.38
7.3.10.0030.01016.62
7.3.00.0090.00616.55
7.2.330.0070.01016.88
7.2.320.0090.01516.88
7.2.310.0110.00616.82
7.2.300.0030.01316.75
7.2.290.0070.01116.75
7.2.130.0040.00816.92
7.2.120.0080.00417.14
7.2.110.0030.00717.05
7.2.100.0140.01016.91
7.2.90.0040.01116.81
7.2.80.0100.00717.25
7.2.70.0080.00816.96
7.2.60.0100.01016.89
7.2.50.0120.00017.04
7.2.40.0030.01417.00
7.2.30.0120.00317.02
7.2.20.0000.01517.12
7.2.10.0110.00716.82
7.2.00.0030.01218.28
7.1.250.0090.00615.86
7.1.100.0040.00718.33
7.1.70.0000.01117.16
7.1.60.0000.01417.41
7.1.50.0070.00717.13
7.1.00.0130.06722.39
7.0.200.0040.00717.08
7.0.140.0000.03722.01
7.0.60.0030.09020.09
7.0.50.0030.04717.92
7.0.40.0030.05320.11
7.0.30.0230.08320.21
7.0.20.0230.05720.36
7.0.10.0270.07720.23
7.0.00.0100.08020.18
5.6.280.0070.06720.82
5.6.210.0000.04320.56
5.6.200.0070.03718.29
5.6.190.0130.08720.77
5.6.180.0270.08020.46
5.6.170.0430.06720.51
5.6.160.0130.07720.56
5.6.150.0030.04018.21
5.6.140.0070.05018.14
5.6.130.0070.03718.21
5.6.120.0070.08720.99
5.6.110.0070.06321.09
5.6.100.0170.05721.03
5.6.90.0070.08321.11
5.6.80.0000.05020.38
5.5.350.0130.07020.34
5.5.340.0100.07718.07
5.5.330.0070.05020.27
5.5.320.0170.06320.41
5.5.310.0230.04320.27
5.5.300.0030.05317.99
5.5.290.0100.05717.99
5.5.280.0000.04320.70
5.5.270.0070.04020.87
5.5.260.0000.04720.80
5.5.250.0130.05320.70
5.5.240.0130.07320.05
5.4.450.0770.06019.61
5.4.440.0830.07319.58
5.4.430.0130.05719.54
5.4.420.0630.05719.62
5.4.410.0130.05319.21
5.4.400.0170.05318.77
5.4.390.0300.04318.70
5.4.380.0230.05018.84
5.4.370.0170.05318.53
5.4.360.0300.06018.81
5.4.350.0200.07318.76
5.4.340.0170.05718.84
5.4.320.0270.04718.76
5.4.310.0100.06018.58
5.4.300.0200.05718.47
5.4.290.0170.05718.71
5.4.280.0070.06318.73
5.4.270.0200.05018.78
5.4.260.0170.05018.79
5.4.250.0200.05318.73
5.4.240.0230.04718.77
5.4.230.0230.04718.73
5.4.220.0200.05018.73
5.4.210.0170.05018.46
5.4.200.0200.04716.55
5.4.190.0100.05718.51
5.4.180.0230.04318.61
5.4.170.0100.06018.76
5.4.160.0130.05718.45
5.4.150.0100.06718.51
5.4.140.0270.04716.29
5.4.130.0170.05316.30
5.4.120.0130.05016.20
5.4.110.0170.05016.42
5.4.100.0200.04716.29
5.4.90.0200.04716.38
5.4.80.0100.05316.28
5.4.70.0230.04716.27
5.4.60.0300.06716.27
5.4.50.0270.04716.39
5.4.40.0200.04716.39
5.4.30.0200.04316.43
5.4.20.0130.05316.28
5.4.10.0170.06016.20
5.4.00.0230.05015.90
5.3.290.0270.05714.86
5.3.280.0330.03714.63
5.3.270.0230.05014.59
5.3.260.0100.06314.64
5.3.250.0170.05314.62
5.3.240.0100.05714.71
5.3.230.0230.05014.64
5.3.220.0200.05314.67
5.3.210.0130.05714.73
5.3.200.0170.05014.65
5.3.190.0130.05314.76
5.3.180.0130.05314.66
5.3.170.0100.05714.62
5.3.160.0170.05014.59
5.3.150.0200.04714.64
5.3.140.0170.05314.59
5.3.130.0170.05014.64
5.3.120.0070.06314.56
5.3.110.0200.07314.60
5.3.100.0200.04314.08
5.3.90.0200.05714.02
5.3.80.0200.04714.02
5.3.70.0230.04314.25
5.3.60.0130.05014.14
5.3.50.0230.04014.10
5.3.40.0170.05013.99
5.3.30.0100.05313.91
5.3.20.0330.04713.80
5.3.10.0330.05313.75
5.3.00.0300.05713.64
5.2.170.0170.05711.19
5.2.160.0030.05311.21
5.2.150.0070.04711.21
5.2.140.0130.04011.43
5.2.130.0130.05011.15
5.2.120.0170.05311.14
5.2.110.0130.04011.15
5.2.100.0030.04711.12
5.2.90.0100.05011.21
5.2.80.0130.04311.11
5.2.70.0130.04711.08
5.2.60.0130.04011.07
5.2.50.0130.04011.01
5.2.40.0100.04011.13
5.2.30.0030.05011.08
5.2.20.0100.04311.06
5.2.10.0070.05010.98
5.2.00.0070.04310.85
5.1.60.0100.03310.03
5.1.50.0070.03710.00
5.1.40.0100.03310.16
5.1.30.0200.02710.57
5.1.20.0100.04710.41
5.1.10.0100.03310.03
5.1.00.0170.03310.11
5.0.50.0070.0308.61
5.0.40.0070.0278.61
5.0.30.0070.0438.32
5.0.20.0000.0338.25
5.0.10.0000.0338.38
5.0.00.0100.0438.22
4.4.90.0070.0205.92
4.4.80.0070.0206.00
4.4.70.0100.0175.94
4.4.60.0070.0206.00
4.4.50.0100.0175.91
4.4.40.0030.0375.91
4.4.30.0030.0236.01
4.4.20.0000.0276.07
4.4.10.0030.0236.02
4.4.00.0030.0375.95
4.3.110.0030.0235.97
4.3.100.0070.0205.86
4.3.90.0030.0235.80
4.3.80.0030.0375.85
4.3.70.0070.0235.83
4.3.60.0070.0235.83
4.3.50.0000.0375.82
4.3.40.0130.0375.78
4.3.30.0070.0204.61
4.3.20.0070.0204.58
4.3.10.0000.0274.61
4.3.00.0100.0236.95

preferences:
35.13 ms | 401 KiB | 5 Q