3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "225cm x 70cm"; if (preg_match_all('/\d+(?:\.\d+)?/', $string, $m)) { $inches = implode(" ", array_map(function ($x) { return round(intval($x) * 0.39370 / 0.5) * 0.5; }, $m[0])); echo $inches; }

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.5.70.0090.00816.77
8.5.60.0010.00716.86
8.5.50.0050.00316.90
8.5.30.0090.00820.82
8.5.20.0120.00621.29
8.5.10.0050.01318.52
8.5.00.0120.01120.21
8.4.210.0140.01119.93
8.4.180.0110.01119.88
8.4.170.0050.00521.99
8.4.160.0070.00222.05
8.4.150.0060.00617.00
8.4.140.0160.00717.78
8.4.130.0120.00618.72
8.4.120.0120.00824.07
8.4.110.0100.00818.90
8.4.100.0110.01018.84
8.4.90.0080.01220.73
8.4.80.0050.00518.42
8.4.70.0040.00419.11
8.4.60.0140.00818.95
8.4.50.0130.00618.82
8.4.40.0100.01018.00
8.4.30.0120.00918.63
8.4.20.0150.00020.42
8.4.10.0100.00317.86
8.3.300.0130.00918.63
8.3.290.0120.00820.73
8.3.280.0150.00618.60
8.3.270.0120.00816.59
8.3.260.0070.00316.80
8.3.250.0040.00518.85
8.3.240.0090.01017.41
8.3.230.0110.00816.88
8.3.220.0040.00519.16
8.3.210.0130.00618.43
8.3.200.0040.00416.69
8.3.190.0030.00616.89
8.3.180.0060.00516.74
8.3.170.0160.00317.15
8.3.160.0110.00720.75
8.3.150.0160.00317.10
8.3.140.0110.00716.85
8.3.130.0080.00016.72
8.3.120.0060.00919.12
8.3.110.0040.00420.94
8.3.100.0040.00424.06
8.3.90.0080.00826.77
8.3.80.0000.01020.52
8.3.70.0150.00616.75
8.3.60.0060.01218.55
8.3.50.0090.01219.90
8.3.40.0100.00323.75
8.3.30.0040.01118.97
8.3.20.0050.00224.18
8.3.10.0020.00524.66
8.3.00.0050.00326.16
8.2.300.0130.00622.18
8.2.290.0040.00720.61
8.2.280.0110.00818.37
8.2.270.0050.00316.86
8.2.260.0030.00616.73
8.2.250.0110.00318.96
8.2.240.0110.00017.00
8.2.230.0050.00322.58
8.2.220.0050.00337.54
8.2.210.0100.00726.77
8.2.200.0030.00616.75
8.2.190.0060.01316.75
8.2.180.0070.00725.92
8.2.170.0110.00819.13
8.2.160.0040.01122.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00421.24
8.2.110.0060.00320.96
8.2.100.0060.00617.97
8.2.90.0080.00017.91
8.2.80.0030.00519.29
8.2.70.0000.00817.88
8.2.60.0050.00517.75
8.2.50.0060.00317.98
8.2.40.0050.00318.09
8.2.30.0050.00317.91
8.2.20.0040.00420.64
8.2.10.0000.00817.97
8.2.00.0040.00419.42
8.1.340.0130.00825.50
8.1.330.0110.00822.17
8.1.320.0110.00916.22
8.1.310.0100.00016.63
8.1.300.0060.00318.35
8.1.290.0070.00718.88
8.1.280.0090.00925.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0040.00821.91
8.1.230.0140.00021.04
8.1.220.0050.00317.80
8.1.210.0030.00518.91
8.1.200.0030.00617.48
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0000.00817.80
8.1.160.0000.00718.99
8.1.150.0000.00818.78
8.1.140.0000.00817.61
8.1.130.0000.00718.96
8.1.120.0040.00417.72
8.1.110.0000.00717.71
8.1.100.0000.00717.76
8.1.90.0080.00017.70
8.1.80.0090.00017.58
8.1.70.0080.00017.65
8.1.60.0040.00417.81
8.1.50.0000.00817.64
8.1.40.0040.00417.80
8.1.30.0060.00617.77
8.1.20.0040.00417.82
8.1.10.0000.00817.77
8.1.00.0070.00717.71
8.0.300.0040.00419.98
8.0.290.0000.00716.88
8.0.280.0050.00318.46
8.0.270.0040.00416.91
8.0.260.0000.00618.45
8.0.250.0030.00317.14
8.0.240.0030.00317.08
8.0.230.0000.00817.07
8.0.220.0030.00316.99
8.0.210.0050.00317.14
8.0.200.0030.00317.03
8.0.190.0060.00617.23
8.0.180.0040.00417.13
8.0.170.0040.00417.12
8.0.160.0050.00317.16
8.0.150.0030.00517.07
8.0.140.0030.00717.09
8.0.130.0120.00716.93
8.0.120.0170.00317.08
8.0.110.0190.00017.07
8.0.100.0150.00517.05
8.0.90.0160.00316.96
8.0.80.0150.00417.11
8.0.70.0130.00517.08
8.0.60.0110.00717.12
8.0.50.0110.00717.02
8.0.30.0100.01016.98
8.0.20.0180.00016.98
8.0.10.0130.00617.06
8.0.00.0060.00617.21
7.4.330.0020.00215.55
7.4.320.0000.00716.88
7.4.300.0030.00316.75
7.4.290.0060.00316.80
7.4.280.0030.00616.77
7.4.270.0100.00016.80
7.4.260.0220.00016.74
7.4.250.0180.00616.77
7.4.240.0150.01016.86
7.4.230.0180.00416.69
7.4.220.0120.00616.83
7.4.210.0110.00716.84
7.4.200.0120.00616.73
7.4.190.0110.00716.81
7.4.180.0110.00616.92
7.4.160.0130.00416.95
7.4.150.0130.00516.75
7.4.140.0150.00316.88
7.4.130.0120.00616.69
7.4.120.0090.00916.85
7.4.110.0060.01316.67
7.4.100.0090.00916.68
7.4.90.0120.00616.86
7.4.80.0140.00416.79
7.4.70.0060.01216.66
7.4.60.0160.00216.65
7.4.50.0170.00016.75
7.4.40.0060.01216.79
7.4.30.0140.00516.58
7.4.20.0150.00316.71
7.4.10.0140.00416.64
7.4.00.0140.00516.67
7.3.330.0190.00316.40
7.3.320.0140.00816.44
7.3.310.0140.00516.43
7.3.300.0160.00416.45
7.3.290.0190.00016.54
7.3.280.0140.00716.41
7.3.270.0140.00816.50
7.3.260.0090.00916.55
7.3.250.0150.00016.54
7.3.240.0000.01116.61
7.3.230.0070.00516.47
7.3.220.0140.00016.54
7.3.210.0150.00316.53
7.3.200.0100.00416.41
7.3.190.0070.00016.35
7.3.180.0060.00016.55
7.3.170.0030.00316.48
7.3.160.0050.00316.52
7.3.150.0030.00316.49
7.3.140.0050.00216.55
7.3.130.0000.00816.34

preferences:
31.23 ms | 1337 KiB | 5 Q