3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrase = "You should eat fruuits, vegetaaables, and fiiibeeer every day."; $healthy = array("fruits", "vegetables", "fiber"); $patterns = array_map(function($term){ $newterm = ""; for($x=0; $x<strlen($term); $x++) $newterm.= preg_escape($term[$x], "~")."+"; return "~(".$newterm.")~"; }, $healthy); print_r($patterns); $yummy = array("pizza", "beer", "ice cream"); $newphrase = str_replace($healthy, $yummy, $phrase);

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.40.0070.00718.96
8.3.30.0040.01118.73
8.3.20.0090.00620.34
8.3.10.0000.00723.67
8.3.00.0030.00519.66
8.2.170.0060.01322.96
8.2.160.0140.00720.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0030.00619.39
8.2.100.0110.00017.91
8.2.90.0080.00019.05
8.2.80.0030.00617.97
8.2.70.0000.00817.63
8.2.60.0050.00317.63
8.2.50.0040.00417.63
8.2.40.0000.00919.48
8.2.30.0040.00418.07
8.2.20.0000.00917.78
8.2.10.0080.00018.04
8.2.00.0000.00718.13
8.1.270.0040.00420.37
8.1.260.0120.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.69
8.1.230.0040.00817.72
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0070.00317.35
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0030.00617.65
8.1.160.0000.00721.95
8.1.150.0040.00418.79
8.1.140.0050.00317.56
8.1.130.0070.00017.78
8.1.120.0020.00517.54
8.1.110.0040.00417.36
8.1.100.0080.00017.40
8.1.90.0000.00817.36
8.1.80.0080.00017.48
8.1.70.0070.00017.51
8.1.60.0080.00017.52
8.1.50.0040.00417.44
8.1.40.0040.00417.52
8.1.30.0000.00817.66
8.1.20.0080.00017.61
8.1.10.0000.00717.54
8.1.00.0070.00017.59
8.0.300.0030.00518.84
8.0.290.0000.00716.75
8.0.280.0040.00418.41
8.0.270.0030.00317.21
8.0.260.0000.00617.25
8.0.250.0080.00016.93
8.0.240.0100.00016.94
8.0.230.0000.01016.93
8.0.220.0000.00716.88
8.0.210.0000.00716.90
8.0.200.0030.00316.90
8.0.190.0030.00617.00
8.0.180.0040.00416.89
8.0.170.0030.00617.01
8.0.160.0000.00716.87
8.0.150.0040.00416.92
8.0.140.0050.00216.93
8.0.130.0000.00513.42
8.0.120.0000.00916.98
8.0.110.0000.00817.00
8.0.100.0040.00416.80
8.0.90.0040.00416.97
8.0.80.0070.00716.99
8.0.70.0070.00016.81
8.0.60.0070.00016.95
8.0.50.0040.00416.93
8.0.30.0100.00417.18
8.0.20.0100.01317.40
8.0.10.0040.00416.95
8.0.00.0110.00716.76
7.4.330.0030.00315.08
7.4.320.0030.00316.62
7.4.300.0030.00316.45
7.4.290.0000.00716.48
7.4.280.0000.00716.61
7.4.270.0030.00316.45
7.4.260.0040.00416.51
7.4.250.0070.00016.49
7.4.240.0000.00716.61
7.4.230.0030.00316.51
7.4.220.0120.00616.57
7.4.210.0080.00616.48
7.4.200.0070.00016.50
7.4.160.0100.00616.45
7.4.150.0160.00317.40
7.4.140.0110.01217.86
7.4.130.0070.01016.58
7.4.120.0100.01316.56
7.4.110.0040.01416.51
7.4.100.0100.00716.57
7.4.90.0060.01116.46
7.4.80.0100.00719.39
7.4.70.0050.01416.67
7.4.60.0090.01216.50
7.4.50.0000.00816.27
7.4.40.0090.00616.64
7.4.30.0040.01716.50
7.4.00.0030.01314.81
7.3.330.0020.00213.30
7.3.320.0000.00613.44
7.3.310.0070.00016.34
7.3.300.0030.00316.46
7.3.290.0000.00716.39
7.3.280.0060.01216.44
7.3.270.0130.01017.40
7.3.260.0140.00316.38
7.3.250.0060.01116.48
7.3.240.0070.01016.56
7.3.230.0060.01116.47
7.3.210.0100.00716.66
7.3.200.0060.01016.47
7.3.190.0110.01116.46
7.3.180.0070.01016.37
7.3.170.0080.00816.49
7.3.160.0060.01216.52
7.3.120.0110.00414.90
7.3.110.0070.01114.61
7.3.100.0090.00914.90
7.3.90.0000.01514.90
7.3.80.0060.00914.92
7.3.70.0060.00615.02
7.3.60.0060.00614.95
7.3.50.0040.00714.77
7.3.40.0000.01214.92
7.3.30.0100.00314.75
7.3.20.0080.00716.85
7.3.10.0100.00316.75
7.3.00.0100.00316.76
7.2.330.0030.01316.68
7.2.320.0100.01316.62
7.2.310.0110.00616.63
7.2.300.0060.01216.45
7.2.290.0140.00316.37
7.2.250.0100.01015.04
7.2.240.0070.01015.19
7.2.230.0090.00614.64
7.2.220.0040.01414.97
7.2.210.0070.00715.04
7.2.200.0030.00715.05
7.2.190.0040.01115.17
7.2.180.0000.01115.05
7.2.170.0090.00315.09
7.2.160.0090.00615.10
7.2.150.0070.01016.71
7.2.140.0070.00717.09
7.2.130.0060.00616.84
7.2.120.0100.00316.70
7.2.110.0030.00716.76
7.2.100.0060.00916.89
7.2.90.0060.01016.72
7.2.80.0060.00616.76
7.2.70.0000.01016.95
7.2.60.0140.00516.74
7.2.50.0090.00917.00
7.2.40.0000.01216.80
7.2.30.0060.00617.10
7.2.20.0040.01117.03
7.2.10.0040.01116.77
7.2.00.0090.00918.30
7.1.330.0050.00816.08
7.1.320.0070.00315.89
7.1.310.0060.00615.79
7.1.300.0100.00315.92
7.1.290.0110.00415.79
7.1.280.0090.00315.65
7.1.270.0080.00415.82
7.1.260.0000.01015.84
7.1.250.0030.00715.90
7.1.240.0070.00315.61
7.1.230.0040.00715.62
7.1.220.0000.01315.96
7.1.210.0070.01015.58
7.1.200.0030.01015.92
7.1.190.0130.00315.90
7.1.180.0070.00715.87
7.1.170.0030.01415.59
7.1.160.0070.00415.57
7.1.150.0030.01015.46
7.1.140.0080.00415.80
7.1.130.0090.00315.93
7.1.120.0000.01315.79
7.1.110.0090.00615.91
7.1.100.0030.00817.01
7.1.90.0090.00015.84
7.1.80.0030.01215.81
7.1.70.0080.00316.39
7.1.60.0080.01217.38
7.1.50.0080.01116.41
7.1.40.0100.00715.71
7.1.30.0000.01315.61
7.1.20.0030.00915.90
7.1.10.0040.01115.69
7.1.00.0060.03619.13
7.0.330.0030.01015.41
7.0.320.0060.00615.43
7.0.310.0030.00915.60
7.0.300.0070.01015.32
7.0.290.0100.00315.17
7.0.280.0060.00815.23
7.0.270.0060.00615.38
7.0.260.0060.00915.26
7.0.250.0030.01015.52
7.0.240.0070.00715.43
7.0.230.0030.00615.51
7.0.220.0090.00615.47
7.0.210.0030.01315.57
7.0.200.0110.00815.92
7.0.190.0110.00415.48
7.0.180.0060.01015.26
7.0.170.0070.00715.53
7.0.160.0070.00315.07
7.0.150.0160.00015.65
7.0.140.0140.00015.56
7.0.130.0060.00915.20
7.0.120.0070.01315.46
7.0.110.0080.00415.52
7.0.100.0060.00615.40
7.0.90.0100.00315.46
7.0.80.0060.00315.41
7.0.70.0030.00615.51
7.0.60.0050.02817.54
7.0.50.0070.04416.68
7.0.40.0090.02116.78
7.0.30.0150.02716.86
7.0.20.0170.03416.95
7.0.10.0060.02816.84
7.0.00.0000.02816.90
5.6.400.0000.01214.01
5.6.390.0030.01014.20
5.6.380.0000.00914.49
5.6.370.0060.00314.32
5.6.360.0030.01314.05
5.6.350.0040.00814.32
5.6.340.0040.01414.38
5.6.330.0040.00814.27
5.6.320.0060.00614.05
5.6.310.0120.00314.54
5.6.300.0000.01414.11
5.6.290.0060.01214.32
5.6.280.0040.03317.68
5.6.270.0000.02014.24
5.6.260.0030.00814.24
5.6.250.0060.01014.19
5.6.240.0000.01614.48
5.6.230.0040.00714.25
5.6.220.0030.01214.16
5.6.210.0070.04517.47
5.6.200.0080.02816.34
5.6.190.0050.02317.44
5.6.180.0260.04017.25
5.6.170.0120.02317.35
5.6.160.0060.03317.48
5.6.150.0070.03216.23
5.6.140.0120.03816.23
5.6.130.0050.02516.24
5.6.120.0030.02317.78
5.6.110.0140.03417.66
5.6.100.0070.01917.63
5.6.90.0090.04417.56
5.6.80.0080.03317.30
5.6.70.0110.00014.33
5.6.60.0060.00613.99
5.6.50.0040.00814.31
5.6.40.0000.01314.27
5.6.30.0080.00414.24
5.6.20.0070.00714.36
5.6.10.0070.00714.14
5.6.00.0090.00314.13
5.5.380.0070.00714.05
5.5.370.0000.01114.39
5.5.360.0030.01214.45
5.5.350.0210.03517.39
5.5.340.0080.03516.08
5.5.330.0080.04917.18
5.5.320.0020.02717.25
5.5.310.0160.02017.39
5.5.300.0050.03016.06
5.5.290.0070.04016.21
5.5.280.0070.04317.60
5.5.270.0050.02317.41
5.5.260.0030.02817.61
5.5.250.0060.04117.39
5.5.240.0030.02117.14
5.5.230.0080.00414.24
5.5.220.0110.00014.02
5.5.210.0060.00613.90
5.5.200.0040.00413.91
5.5.190.0040.01114.29
5.5.180.0070.01114.01
5.5.170.0000.01413.93
5.5.160.0060.00914.09
5.5.150.0030.00713.91
5.5.140.0000.01514.14
5.5.130.0030.00714.23
5.5.120.0070.00714.05
5.5.110.0100.00314.18
5.5.100.0110.00414.38
5.5.90.0100.00314.11
5.5.80.0000.01114.07
5.5.70.0040.00713.89
5.5.60.0070.00714.04
5.5.50.0100.00614.00
5.5.40.0060.00613.98
5.5.30.0030.00814.14
5.5.20.0070.00314.21
5.5.10.0040.01114.37
5.5.00.0030.00714.12
5.4.450.0400.02316.23
5.4.440.0350.04116.19
5.4.430.0400.03016.19
5.4.420.0330.03816.35
5.4.410.0460.03316.07
5.4.400.0450.02716.23
5.4.390.0320.02716.19
5.4.380.0470.03515.97
5.4.370.0450.03416.18
5.4.360.0420.03216.19
5.4.350.0470.02916.23
5.4.340.0440.03416.10
5.4.330.0040.00413.13
5.4.320.0450.03216.19
5.4.310.0280.03416.03
5.4.300.0360.03016.06
5.4.290.0470.03016.06
5.4.280.0470.02916.10
5.4.270.0400.03216.19
5.4.260.0340.03216.18
5.4.250.0370.03116.19
5.4.240.0260.03116.11
5.4.230.0330.03316.07
5.4.220.0370.02716.24
5.4.210.0340.02716.18
5.4.200.0340.02616.02
5.4.190.0380.02816.18
5.4.180.0420.03315.98
5.4.170.0390.03416.17
5.4.160.0400.02716.09
5.4.150.0300.03416.05
5.4.140.0400.02814.75
5.4.130.0320.02814.75
5.4.120.0330.03414.69
5.4.110.0390.02614.87
5.4.100.0410.02914.82
5.4.90.0370.03014.66
5.4.80.0400.02914.81
5.4.70.0130.03814.83
5.4.60.0100.02714.65
5.4.50.0050.03214.81
5.4.40.0130.03214.83
5.4.30.0070.03414.84
5.4.20.0120.03814.82
5.4.10.0160.03914.82
5.4.00.0000.00713.13

preferences:
53.49 ms | 400 KiB | 5 Q