3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text='this PART should be CONVERTED to uppercase [This PART should not BE changed] this part should also be CONVERTED to uppercase [THIS part should also not be CHANGED] etc..'; $text = preg_replace_callback( "/(\[(.*?)\])(*SKIP)(*FAIL)|\w+/is", function($m) { return strtoupper($m[0]); }, $text); echo $text;

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.30.0090.00719.32
8.5.20.0050.00319.63
8.5.10.0090.00718.48
8.5.00.0130.00820.13
8.4.180.0120.01119.79
8.4.170.0190.01020.41
8.4.160.0120.01323.78
8.4.150.0150.00516.85
8.4.140.0150.01017.95
8.4.130.0100.01017.96
8.4.120.0100.00920.52
8.4.110.0040.00418.72
8.4.100.0130.00917.96
8.4.90.0100.01020.58
8.4.80.0090.01118.04
8.4.70.0140.00317.83
8.4.60.0140.00618.97
8.4.50.0110.00920.37
8.4.40.0130.00618.02
8.4.30.0090.01218.02
8.4.20.0160.00619.50
8.4.10.0040.00717.82
8.3.300.0130.00820.91
8.3.290.0110.01118.52
8.3.280.0080.00716.24
8.3.270.0100.00916.87
8.3.260.0130.00616.55
8.3.250.0050.00418.94
8.3.240.0070.00316.54
8.3.230.0100.01016.67
8.3.220.0030.00517.29
8.3.210.0120.00720.79
8.3.200.0050.00316.62
8.3.190.0050.00316.59
8.3.180.0030.00618.47
8.3.170.0140.00519.15
8.3.160.0110.00720.36
8.3.150.0100.01018.35
8.3.140.0040.01517.02
8.3.130.0100.00618.46
8.3.120.0130.00618.88
8.3.110.0070.00320.94
8.3.100.0060.00316.57
8.3.90.0110.00718.56
8.3.80.0090.00318.39
8.3.70.0120.00618.61
8.3.60.0120.00918.55
8.3.50.0070.01018.33
8.3.40.0080.00818.78
8.3.30.0120.00418.79
8.3.20.0070.00020.25
8.3.10.0040.00423.61
8.3.00.0040.00423.71
8.2.300.0110.00918.21
8.2.290.0100.00920.40
8.2.280.0050.00318.77
8.2.270.0100.01018.91
8.2.260.0040.00418.80
8.2.250.0040.00417.30
8.2.240.0050.00318.93
8.2.230.0090.00622.58
8.2.220.0040.00424.06
8.2.210.0080.00026.77
8.2.200.0090.00018.68
8.2.190.0040.01116.88
8.2.180.0120.00317.00
8.2.170.0060.00922.96
8.2.160.0100.00720.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00421.12
8.2.110.0060.00322.20
8.2.100.0080.00319.89
8.2.90.0050.00317.88
8.2.80.0050.00318.86
8.2.70.0040.00419.73
8.2.60.0080.00017.93
8.2.50.0000.00818.15
8.2.40.0070.00020.42
8.2.30.0080.00019.23
8.2.20.0050.00218.14
8.2.10.0000.00718.21
8.2.00.0040.00418.03
8.1.340.0090.01121.69
8.1.330.0080.01122.04
8.1.320.0040.00516.61
8.1.310.0110.00318.45
8.1.300.0040.00420.10
8.1.290.0100.00018.88
8.1.280.0060.00925.92
8.1.270.0030.00624.01
8.1.260.0070.01126.35
8.1.250.0080.00028.09
8.1.240.0070.00320.64
8.1.230.0090.00317.95
8.1.220.0030.00617.80
8.1.210.0000.00818.77
8.1.200.0050.00517.47
8.1.190.0100.00017.38
8.1.180.0050.00318.10
8.1.170.0040.00418.77
8.1.160.0040.00419.04
8.1.150.0040.00420.75
8.1.140.0000.00717.76
8.1.130.0070.00018.79
8.1.120.0000.00717.55
8.1.110.0000.00917.49
8.1.100.0040.00417.62
8.1.90.0000.00717.64
8.1.80.0030.00617.63
8.1.70.0030.00317.66
8.1.60.0000.00817.62
8.1.50.0080.00017.60
8.1.40.0040.00417.57
8.1.30.0030.00517.78
8.1.20.0000.00717.69
8.1.10.0000.00917.63
8.1.00.0040.00417.63
8.0.300.0060.00318.84
8.0.290.0040.00416.75
8.0.280.0070.00018.32
8.0.270.0000.00717.27
8.0.260.0000.00717.01
8.0.250.0030.00316.98
8.0.240.0070.00417.11
8.0.230.0050.00217.05
8.0.220.0040.00416.96
8.0.210.0040.00317.00
8.0.200.0000.00716.98
8.0.190.0080.00017.03
8.0.180.0000.00816.97
8.0.170.0040.00416.89
8.0.160.0040.00417.06
8.0.150.0040.00416.93
8.0.140.0040.00417.00
8.0.130.0000.00513.45
8.0.120.0040.00416.88
8.0.110.0000.00817.08
8.0.100.0000.00816.90
8.0.90.0000.00717.05
8.0.80.0070.00716.99
8.0.70.0020.00516.98
8.0.60.0040.00417.11
8.0.50.0000.00816.92
8.0.30.0130.00717.31
8.0.20.0100.00817.40
8.0.10.0070.00317.01
8.0.00.0070.01116.91
7.4.330.0030.00316.74
7.4.320.0030.00316.80
7.4.300.0000.00616.72
7.4.290.0030.00316.70
7.4.280.0000.00716.80
7.4.270.0030.00516.72
7.4.260.0040.00416.74
7.4.250.0030.00516.69
7.4.240.0000.00716.71
7.4.230.0070.00016.62
7.4.220.0120.00616.89
7.4.210.0060.01116.75
7.4.200.0030.00316.84
7.4.160.0030.01216.69
7.4.150.0030.01517.40
7.4.140.0110.00717.86
7.4.130.0060.01616.62
7.4.120.0100.00916.68
7.4.110.0070.01116.52
7.4.100.0080.00816.58
7.4.90.0170.00016.94
7.4.80.0100.01019.39
7.4.70.0090.00916.80
7.4.60.0070.01016.84
7.4.50.0000.01516.80
7.4.40.0100.00716.54
7.4.30.0110.00516.66
7.4.00.0100.00714.96
7.3.330.0000.00513.29
7.3.320.0030.00313.47
7.3.310.0000.00616.55
7.3.300.0060.00016.53
7.3.290.0030.00316.37
7.3.280.0060.01016.44
7.3.270.0060.01217.40
7.3.260.0090.01316.51
7.3.250.0080.01116.61
7.3.240.0100.00816.58
7.3.230.0050.01416.70
7.3.210.0090.00916.59
7.3.200.0100.00616.85
7.3.190.0030.01316.54
7.3.180.0060.01516.42
7.3.170.0030.01316.58
7.3.160.0000.01616.61
7.2.330.0100.00716.80
7.2.320.0150.00316.93
7.2.310.0090.01216.78
7.2.300.0060.01216.70
7.2.290.0100.01016.73
7.2.60.0140.00917.14
7.2.50.0000.01316.81
7.1.200.0030.00816.02
7.1.110.0030.01418.18
7.1.100.0090.00318.53
7.1.90.0000.01618.17
7.1.80.0060.01217.98
7.1.70.0030.01017.35
7.1.60.0160.01235.30
7.1.50.0160.01235.07
7.1.40.0150.01534.54
7.1.30.0210.00934.69
7.1.20.0170.01335.05
7.1.10.0060.00916.57
7.1.00.0030.01017.04
7.0.250.0150.00617.89
7.0.240.0070.00617.97
7.0.230.0060.00918.00
7.0.220.0060.01218.24
7.0.210.0030.01016.48
7.0.200.0090.00316.96
7.0.190.0090.00317.09
7.0.180.0030.01316.66
7.0.170.0030.01016.38
7.0.160.0000.01416.38
7.0.150.0090.00616.48
7.0.140.0040.01116.48
7.0.130.0100.00516.95
7.0.120.0040.01116.67
7.0.110.0080.00816.44
7.0.100.0090.00916.63
7.0.90.0080.00816.51
7.0.80.0090.00616.79
7.0.70.0000.01416.58
7.0.60.0110.00416.41
7.0.50.0090.00616.78
7.0.40.0070.01016.73
7.0.30.0090.00616.83
7.0.20.0200.01316.88
7.0.10.0220.01014.79
7.0.00.0060.00916.57

preferences:
325.11 ms | 1521 KiB | 5 Q