3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bodycontent = "<p>We've been in business since 1998 and produced this logo design [1995] years ago.</p>\n"; $bodycontent .= "<p>We've been in business since 1998 and produced this website design [2018] years ago.</p>\n"; $bodycontent .= "<p>We've been in business since 1998 and produced this website design [2017] years ago.</p>\n"; $bodycontent .= "<p>We've been in business since 1998 and produced this website design [2016] years ago.</p>"; $lookup=['less than a','one','two','three','four','five','six','seven','eight','nine', 'ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen' ]; // extend as needed $bodycontent = preg_replace_callback('/\[(\d{4})] years ago/', function($m)use($lookup){ $diff=date('Y')-$m[1]; if(isset($lookup[$diff])){ return $lookup[$diff].' year'.($diff>1?'s':'').' ago'; }else{ return "in {$m[1]}"; // out of lookup range, use backup text } }, $bodycontent); echo $bodycontent;

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.4.130.0050.00419.90
8.4.120.0120.00920.59
8.4.110.0140.00622.75
8.4.100.0140.00717.97
8.4.90.0080.01119.00
8.4.80.0120.00718.88
8.4.70.0130.00918.06
8.4.60.0050.00618.90
8.4.50.0050.00318.79
8.4.40.0190.00318.03
8.4.30.0100.01019.62
8.4.20.0090.00518.71
8.4.10.0060.00319.69
8.3.260.0090.00816.95
8.3.250.0140.00518.91
8.3.240.0110.00916.68
8.3.230.0060.00416.95
8.3.220.0110.00518.94
8.3.210.0060.00716.81
8.3.200.0040.00516.98
8.3.190.0060.00219.13
8.3.180.0110.00816.66
8.3.170.0100.01018.78
8.3.160.0040.01519.01
8.3.150.0110.00717.25
8.3.140.0030.00620.75
8.3.130.0060.00318.80
8.3.120.0090.00019.18
8.3.110.0060.00920.94
8.3.100.0040.00418.50
8.3.90.0050.00326.77
8.3.80.0030.00717.97
8.3.70.0160.00617.13
8.3.60.0140.00018.55
8.3.50.0110.00918.41
8.3.40.0120.00319.13
8.3.30.0110.00819.07
8.3.20.0060.00320.16
8.3.10.0050.00323.65
8.3.00.0060.00319.79
8.2.290.0120.00620.52
8.2.280.0100.00918.56
8.2.270.0060.00918.88
8.2.260.0060.00918.72
8.2.250.0050.00518.73
8.2.240.0030.00617.38
8.2.230.0050.00522.58
8.2.220.0090.00324.06
8.2.210.0100.00526.77
8.2.200.0030.00616.75
8.2.190.0080.00816.75
8.2.180.0090.00618.41
8.2.170.0140.00722.96
8.2.160.0080.00819.33
8.2.150.0080.00024.18
8.2.140.0060.00624.66
8.2.130.0060.00326.16
8.2.120.0040.00421.18
8.2.110.0090.00020.52
8.2.100.0060.00618.09
8.2.90.0040.00418.22
8.2.80.0090.00022.25
8.2.70.0050.00318.03
8.2.60.0030.00618.05
8.2.50.0030.00518.10
8.2.40.0050.00220.44
8.2.30.0080.00019.38
8.2.20.0000.00718.30
8.2.10.0000.00818.29
8.2.00.0090.00018.37
8.1.330.0090.00921.95
8.1.320.0100.00916.65
8.1.310.0110.00416.81
8.1.300.0030.00518.59
8.1.290.0110.00030.84
8.1.280.0070.01125.92
8.1.270.0080.00022.36
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0110.00023.87
8.1.230.0000.01323.93
8.1.220.0030.00517.74
8.1.210.0060.00318.89
8.1.200.0040.00417.73
8.1.190.0040.00419.32
8.1.180.0050.00318.10
8.1.170.0080.00018.96
8.1.160.0040.00418.90
8.1.150.0030.00320.37
8.1.140.0000.00717.85
8.1.130.0040.00719.14
8.1.120.0040.00317.84
8.1.110.0040.00417.78
8.1.100.0050.00317.67
8.1.90.0050.00317.67
8.1.80.0040.00417.73
8.1.70.0040.00417.65
8.1.60.0000.00817.71
8.1.50.0000.00817.74
8.1.40.0040.00417.82
8.1.30.0050.00317.92
8.1.20.0060.00317.86
8.1.10.0000.00817.86
8.1.00.0040.00417.78
8.0.300.0000.00720.04
8.0.290.0000.00817.13
8.0.280.0030.00318.48
8.0.270.0030.00317.39
8.0.260.0100.00018.61
8.0.250.0000.00717.32
8.0.240.0040.00417.38
8.0.230.0040.00417.22
8.0.220.0050.00317.27
8.0.210.0040.00417.25
8.0.200.0000.00717.30
8.0.190.0040.00417.25
8.0.180.0050.00217.23
8.0.170.0090.00017.30
8.0.160.0050.00317.17
8.0.150.0040.00417.22
8.0.140.0000.00817.11
8.0.130.0000.00513.53
8.0.120.0000.00717.11
8.0.110.0040.00417.11
8.0.100.0030.00617.20
8.0.90.0000.00817.23
8.0.80.0120.00317.07
8.0.70.0040.00417.18
8.0.60.0000.00716.98
8.0.50.0040.00417.20
8.0.30.0100.00617.30
8.0.20.0140.00917.44
8.0.10.0050.00317.21
8.0.00.0140.00616.87
7.4.330.0020.00215.55
7.4.320.0050.00316.84
7.4.300.0050.00216.97
7.4.290.0000.00716.94
7.4.280.0000.00716.71
7.4.270.0000.00816.85
7.4.260.0070.00016.82
7.4.250.0020.00516.80
7.4.240.0000.00716.83
7.4.230.0000.00716.79
7.4.220.0050.00216.94
7.4.210.0060.01617.01
7.4.200.0030.00316.85
7.4.160.0050.01216.79
7.4.150.0140.00317.40
7.4.140.0100.00717.86
7.4.130.0150.00316.97
7.4.120.0100.01116.85
7.4.110.0070.01016.85
7.4.100.0150.00816.79
7.4.90.0070.01016.85
7.4.80.0040.01219.39
7.4.70.0100.01016.81
7.4.60.0060.00916.82
7.4.50.0100.00716.62
7.4.40.0160.00616.65
7.4.00.0070.01015.34
7.3.330.0000.00613.39
7.3.320.0000.00613.50
7.3.310.0050.00216.64
7.3.300.0000.00716.52
7.3.290.0090.00816.54
7.3.280.0070.01116.50
7.3.270.0060.01317.40
7.3.260.0090.01016.70
7.3.240.0070.01116.76
7.3.230.0080.00816.73
7.3.210.0130.00316.68
7.3.200.0030.01616.91
7.3.190.0090.01516.88
7.3.180.0140.00716.55
7.3.170.0080.00816.91
7.3.160.0080.00816.86
7.3.120.0030.01015.03
7.3.110.0090.00614.94
7.3.100.0030.01215.04
7.3.90.0030.01015.11
7.3.80.0060.00615.09
7.3.70.0090.00614.88
7.3.60.0000.01315.08
7.3.50.0090.00615.18
7.3.40.0000.01815.16
7.3.30.0130.00315.08
7.3.20.0070.00317.02
7.3.10.0100.00516.75
7.3.00.0120.00916.89
7.2.330.0100.00717.20
7.2.320.0110.01117.01
7.2.310.0140.00317.12
7.2.300.0060.01317.10
7.2.290.0080.00817.03
7.2.240.0070.00415.31
7.2.230.0030.00915.29
7.2.220.0000.00915.50
7.2.210.0070.01115.20
7.2.200.0070.00715.36
7.2.190.0060.00915.42
7.2.180.0070.00715.14
7.2.170.0040.01415.24
7.2.160.0080.00415.40
7.2.150.0120.00317.13
7.2.140.0070.01017.27
7.2.130.0130.00817.13
7.2.120.0100.00517.06
7.2.110.0050.00917.16
7.2.100.0050.00717.15
7.2.90.0130.00817.34
7.2.80.0090.00617.16
7.2.70.0030.01017.17
7.2.60.0040.00817.29
7.2.50.0040.01117.26
7.2.40.0080.00617.27
7.2.30.0050.00917.18
7.2.20.0190.00717.55
7.2.10.0220.01117.53
7.2.00.0180.01117.53
7.1.330.0030.01016.21
7.1.320.0070.01015.87
7.1.310.0090.00615.87
7.1.300.0050.01116.04
7.1.290.0060.00616.02
7.1.280.0000.01316.02
7.1.270.0030.00915.83
7.1.260.0030.01015.69
7.1.250.0070.00716.07
7.1.200.0090.00315.84
7.1.140.0410.01117.20
7.1.130.0420.01117.06
7.1.120.0390.01617.13
7.1.110.0110.01116.49
7.1.100.0290.01316.42
7.1.90.0370.01516.56
7.1.80.0290.01316.53
7.1.70.0310.00915.60
7.1.60.0680.01033.81
7.1.50.0550.01733.42
7.1.40.0660.01432.97
7.1.30.0640.01033.18
7.1.20.0580.01033.06
7.1.10.0350.00615.32
7.1.00.0430.00015.48

preferences:
301.64 ms | 403 KiB | 5 Q