3v4l.org

run code in 300+ PHP versions simultaneously
<?php $replace = array("Terms of Service ID: #", "(Val: $", "Add'l fee: ", "%)"); $string = "Terms of Service ID: #928374 (Val: $2.50, Add'l fee: 10.25%)"; $result = str_replace($replace, "", $string); $pieces = explode(" ", $result); $pieces[1] = rtrim($pieces[1], ","); print_r($pieces);

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.00618.18
8.3.50.0140.00416.41
8.3.40.0100.00319.02
8.3.30.0040.01118.71
8.3.20.0060.00320.21
8.3.10.0030.00521.92
8.3.00.0050.00321.91
8.2.180.0080.00818.54
8.2.170.0110.01122.96
8.2.160.0070.00722.08
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00419.33
8.2.120.0040.00426.35
8.2.110.0060.00321.12
8.2.100.0070.00417.91
8.2.90.0050.00320.38
8.2.80.0030.00517.97
8.2.70.0030.00517.93
8.2.60.0000.00817.93
8.2.50.0000.00818.16
8.2.40.0050.00220.64
8.2.30.0040.00419.32
8.2.20.0000.00717.98
8.2.10.0040.00418.07
8.2.00.0040.00418.10
8.1.280.0070.00725.92
8.1.270.0040.00421.73
8.1.260.0060.00326.35
8.1.250.0090.00028.09
8.1.240.0000.01019.16
8.1.230.0040.00720.97
8.1.220.0040.00417.74
8.1.210.0030.00619.04
8.1.200.0080.00017.35
8.1.190.0040.00417.36
8.1.180.0000.00718.10
8.1.170.0040.00418.59
8.1.160.0040.00418.80
8.1.150.0000.00720.08
8.1.140.0080.00017.70
8.1.130.0000.00819.02
8.1.120.0030.00417.43
8.1.110.0030.00517.44
8.1.100.0000.00717.41
8.1.90.0000.00717.39
8.1.80.0050.00317.23
8.1.70.0030.00317.42
8.1.60.0050.00217.48
8.1.50.0040.00417.35
8.1.40.0000.00717.36
8.1.30.0080.00017.61
8.1.20.0040.00417.44
8.1.10.0070.00017.48
8.1.00.0030.00717.42
8.0.300.0020.00519.89
8.0.290.0050.00316.58
8.0.280.0070.00018.24
8.0.270.0050.00317.08
8.0.260.0030.00318.40
8.0.250.0030.00316.91
8.0.240.0040.00416.94
8.0.230.0030.00316.79
8.0.220.0040.00416.79
8.0.210.0020.00516.86
8.0.200.0000.00716.85
8.0.190.0070.00016.86
8.0.180.0040.00416.92
8.0.170.0040.00416.81
8.0.160.0000.00716.82
8.0.150.0000.00716.61
8.0.140.0030.00316.83
8.0.130.0000.00513.30
8.0.120.0000.00816.69
8.0.110.0000.00716.88
8.0.100.0000.00716.70
8.0.90.0000.00816.88
8.0.80.0000.01516.75
8.0.70.0040.00416.88
8.0.60.0040.00416.90
8.0.50.0040.00416.69
8.0.30.0060.01117.15
8.0.20.0100.00817.40
8.0.10.0000.00717.02
8.0.00.0170.00016.89
7.4.330.0000.00515.55
7.4.320.0000.00616.36
7.4.300.0000.00616.44
7.4.290.0070.00016.53
7.4.280.0000.00716.43
7.4.270.0030.00316.38
7.4.260.0000.00716.58
7.4.250.0050.00316.43
7.4.240.0030.00316.44
7.4.230.0000.00716.54
7.4.220.0140.00416.55
7.4.210.0070.00716.32
7.4.200.0040.00416.48
7.4.160.0100.00616.60
7.4.150.0040.01417.40
7.4.140.0110.00917.86
7.4.130.0030.01516.43
7.4.120.0080.01016.41
7.4.110.0110.00716.32
7.4.100.0160.00316.41
7.4.90.0100.00716.45
7.4.80.0030.02019.39
7.4.70.0120.00616.48
7.4.60.0120.01516.32
7.4.50.0100.00416.23
7.4.40.0090.00916.36
7.4.30.0160.00616.36
7.4.00.0050.01014.95
7.3.330.0040.00413.13
7.3.320.0030.00313.10
7.3.310.0070.00016.23
7.3.300.0030.00316.23
7.3.290.0080.00716.27
7.3.280.0080.00916.27
7.3.270.0000.01617.40
7.3.260.0070.01116.31
7.3.250.0090.00916.35
7.3.240.0060.01316.36
7.3.230.0030.01616.27
7.3.210.0080.00816.24
7.3.200.0140.00316.21
7.3.190.0160.00616.31
7.3.180.0140.00716.38
7.3.170.0160.00016.26
7.3.160.0060.01516.31
7.3.120.0070.01114.79
7.3.110.0130.00614.73
7.3.100.0070.01015.03
7.3.90.0030.01214.64
7.3.80.0060.00914.88
7.3.70.0100.00014.57
7.3.60.0070.00714.68
7.3.50.0030.01414.72
7.3.40.0030.01014.83
7.3.30.0110.00414.73
7.3.20.0030.00816.57
7.3.10.0070.00916.50
7.3.00.0200.00716.41
7.2.330.0070.01116.80
7.2.320.0080.00916.76
7.2.310.0120.00616.79
7.2.300.0030.01416.48
7.2.290.0100.00716.42
7.2.250.0110.00615.21
7.2.240.0070.01014.94
7.2.230.0070.00715.18
7.2.220.0060.00314.90
7.2.210.0070.00714.78
7.2.200.0040.00814.98
7.2.190.0040.01214.88
7.2.180.0000.01314.75
7.2.170.0060.00615.01
7.2.130.0280.00816.61
7.2.120.0300.00316.62
7.2.110.0100.00716.71
7.2.100.0430.00016.63
7.2.90.0210.01016.52
7.2.80.0150.00916.92
7.2.70.0060.02116.66
7.2.60.0120.00716.91
7.2.50.0030.01016.18
7.2.40.0060.01216.61
7.2.30.0000.01516.72
7.2.20.0040.00716.66
7.2.10.0040.01116.61
7.2.00.0030.01016.71
7.1.330.0090.00615.51
7.1.320.0030.00615.65
7.1.310.0060.00615.66
7.1.300.0030.00615.76
7.1.290.0040.00815.64
7.1.280.0070.00715.89
7.1.270.0080.00415.80
7.1.260.0070.00715.79
7.1.250.0320.00715.39
7.1.200.0070.00715.90
7.1.100.0030.01518.16
7.1.90.0090.00618.16
7.1.80.0100.01018.14
7.1.70.0070.01117.24
7.1.60.0240.02034.96
7.1.50.0280.01634.93
7.1.40.0320.01034.36
7.1.30.0320.01134.52
7.1.20.0300.01334.69
7.1.10.0070.01316.48
7.1.00.0080.00816.48
7.0.240.0090.00917.91
7.0.230.0090.00617.55
7.0.220.0090.01017.95
7.0.210.0030.01516.33
7.0.200.0000.01916.63
7.0.190.0070.01316.50
7.0.180.0070.01316.14
7.0.170.0110.00916.30
7.0.160.0080.01216.40
7.0.150.0050.01516.36
7.0.140.0070.01316.43
7.0.130.0120.00416.65
7.0.120.0100.00616.75
7.0.110.0080.00916.26
7.0.100.0080.01116.49
7.0.90.0060.00916.37
7.0.80.0080.00816.43
7.0.70.0030.01616.25
7.0.60.0090.00916.23
7.0.50.0050.01616.31
7.0.40.0030.01816.44
7.0.30.0090.01216.64
7.0.20.0050.01816.54
7.0.10.0080.01516.51
7.0.00.0030.01616.23

preferences:
57.47 ms | 400 KiB | 5 Q