3v4l.org

run code in 300+ PHP versions simultaneously
<?php const PRIV_API_KEY = '1234-5678-8426'; const PRIV_ACCESS_TOKEN = 'fnse0segh-23hfoeghl-fseuhosz'; const NONPRIV_CONST = 42; $priv_constants = array_filter(get_defined_constants(true)['user'], function ($k) { return substr($k, 0, 4) == 'PRIV'; }, ARRAY_FILTER_USE_KEY); $regexes = array_map(function ($v) { return '/' . preg_quote($v) . '/' ; }, $priv_constants); $message = 'Lorem ipsum dolor sit ammet 1234-5678-8426 bibendum id et dolor. Lorem ipsum dolor fnse0segh-23hfoeghl-fseuhosz sit ammet bibendum id et dolor.'; $message = preg_replace_callback($regexes, function ($m) { return preg_replace('/[^-]/', '*', $m[0]); }, $message); echo $message;

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.70.0170.00018.55
8.3.60.0150.00018.56
8.3.50.0120.00718.44
8.3.40.0090.01319.04
8.3.30.0140.00318.64
8.3.20.0080.00021.82
8.3.10.0080.00019.23
8.3.00.0070.00021.84
8.2.190.0060.00916.58
8.2.180.0060.01318.38
8.2.170.0040.01222.96
8.2.160.0040.01122.37
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0110.00326.16
8.2.120.0030.00619.38
8.2.110.0030.00620.60
8.2.100.0090.00318.03
8.2.90.0000.00818.28
8.2.80.0040.00418.00
8.2.70.0040.00418.13
8.2.60.0080.00018.22
8.2.50.0030.00618.10
8.2.40.0030.00521.21
8.2.30.0030.00520.64
8.2.20.0000.00718.31
8.2.10.0000.00819.00
8.2.00.0040.00418.08
8.1.280.0130.00625.92
8.1.270.0050.00323.90
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.88
8.1.230.0040.00722.68
8.1.220.0000.00817.78
8.1.210.0000.00919.03
8.1.200.0050.00817.38
8.1.190.0050.00317.48
8.1.180.0080.00018.10
8.1.170.0040.00418.71
8.1.160.0070.00018.97
8.1.150.0000.00718.91
8.1.140.0030.00320.31
8.1.130.0070.00020.32
8.1.120.0040.00417.68
8.1.110.0070.00017.55
8.1.100.0000.00817.62
8.1.90.0080.00317.65
8.1.80.0030.00617.55
8.1.70.0000.00717.58
8.1.60.0000.00817.78
8.1.50.0030.00517.61
8.1.40.0060.00317.63
8.1.30.0040.00417.79
8.1.20.0030.00617.88
8.1.10.0080.00017.69
8.1.00.0040.00417.69
8.0.300.0040.00420.02
8.0.290.0040.00417.00
8.0.280.0030.00318.44
8.0.270.0040.00416.98
8.0.260.0050.00318.60
8.0.250.0080.00017.20
8.0.240.0040.00417.16
8.0.230.0000.00817.15
8.0.220.0020.00517.13
8.0.210.0050.00316.97
8.0.200.0000.00617.20
8.0.190.0060.00317.05
8.0.180.0050.00317.12
8.0.170.0040.00417.17
8.0.160.0050.00216.99
8.0.150.0040.00417.02
8.0.140.0090.00017.07
8.0.130.0030.00313.44
8.0.120.0000.00816.97
8.0.110.0000.00717.12
8.0.100.0040.00417.05
8.0.90.0000.00716.98
8.0.80.0110.00617.05
8.0.70.0080.00017.21
8.0.60.0000.00816.96
8.0.50.0050.00217.13
8.0.30.0120.00617.38
8.0.20.0120.00817.38
8.0.10.0050.00217.09
8.0.00.0120.00716.87
7.4.330.0000.00415.55
7.4.320.0040.00416.88
7.4.300.0030.00316.77
7.4.290.0000.00916.71
7.4.280.0050.00216.76
7.4.270.0040.00416.84
7.4.260.0020.00516.61
7.4.250.0000.00716.73
7.4.240.0070.00016.93
7.4.230.0030.00316.87
7.4.220.0030.00616.87
7.4.210.0080.00916.77
7.4.200.0000.00716.57
7.4.160.0130.00516.73
7.4.140.0070.01717.86
7.4.130.0090.00916.92
7.4.120.0120.00616.89
7.4.110.0110.00616.86
7.4.100.0090.00916.88
7.4.90.0040.01316.66
7.4.80.0030.01319.39
7.4.70.0150.00316.53
7.4.60.0070.01016.93
7.4.50.0090.00916.70
7.4.40.0190.00316.77
7.4.00.0070.00715.33
7.3.330.0060.00013.39
7.3.320.0060.00013.53
7.3.310.0000.00716.60
7.3.300.0000.00716.50
7.3.290.0060.00916.48
7.3.280.0100.00916.53
7.3.260.0120.00916.64
7.3.240.0080.00916.79
7.3.230.0040.01316.63
7.3.210.0070.01116.87
7.3.200.0160.01116.74
7.3.190.0140.00316.72
7.3.180.0030.01216.70
7.3.170.0160.00616.59
7.3.160.0120.00416.82
7.3.50.0080.00915.03
7.3.40.0090.00914.96
7.3.30.0130.00815.06
7.3.20.0170.00815.12
7.3.10.0240.00815.07
7.3.00.0140.00814.93
7.2.330.0060.01316.96
7.2.320.0150.00316.95
7.2.310.0030.01316.70
7.2.300.0090.01216.84
7.2.290.0120.00616.78
7.2.180.0130.00515.19
7.2.170.0090.00815.04
7.2.160.0050.00815.12
7.2.150.0420.00515.21
7.2.140.0110.00715.39
7.2.130.0150.00915.28
7.2.120.0150.00615.35
7.2.110.0130.00815.23
7.2.100.0160.00515.32
7.2.90.0130.00915.43
7.2.80.0160.01015.36
7.2.70.0160.00715.35
7.2.60.0130.00815.25
7.2.50.0420.00815.30
7.2.40.0200.01115.31
7.2.30.0080.01115.30
7.2.20.0120.00615.37
7.2.10.0080.00715.43
7.2.00.0150.00615.49
7.1.280.0210.00414.19
7.1.270.0100.00614.22
7.1.260.0130.00514.20
7.1.250.0160.00813.99

preferences:
29.87 ms | 401 KiB | 5 Q