3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Simplify { public static function Template($file, $variables) { $template = $file; preg_match_all("{{(\w*)}}", $template, $matches); foreach($matches[1] as $var) { if (array_key_exists($var, $variables)) { $template = str_replace('{{' . $var . '}}', $variables[$var], $template); } } echo $template; } } $template = "hfwlei ifaugweifg uwfgyakreu fvgw fwaeuif gonwiegf {{naam}} uywanfi awyuegfawuyegf {{email}}"; $vars = array("naam" => "Joran", "email" => "info@jorandesign.nl"); Simplify::Template($template, $vars);

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.0090.00618.92
8.3.30.0100.00320.29
8.3.20.0040.00420.34
8.3.10.0040.00420.98
8.3.00.0050.00322.46
8.2.170.0150.00022.96
8.2.160.0130.00322.33
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.74
8.2.110.0080.00419.21
8.2.100.0000.01217.84
8.2.90.0000.00819.34
8.2.80.0040.00417.97
8.2.70.0030.00717.75
8.2.60.0030.00618.16
8.2.50.0070.00718.07
8.2.40.0000.00918.07
8.2.30.0020.00519.53
8.2.20.0040.00417.82
8.2.10.0080.00017.94
8.2.00.0040.00417.88
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00620.82
8.1.230.0060.00621.05
8.1.220.0050.00318.77
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0000.00817.52
8.1.180.0060.00318.10
8.1.170.0040.00418.74
8.1.160.0030.00518.91
8.1.150.0030.00618.86
8.1.140.0040.00417.63
8.1.130.0000.00717.87
8.1.120.0040.00417.57
8.1.110.0100.00017.63
8.1.100.0030.00617.52
8.1.90.0020.00517.63
8.1.80.0040.00417.64
8.1.70.0000.00717.53
8.1.60.0040.00417.77
8.1.50.0000.00717.70
8.1.40.0030.00517.58
8.1.30.0070.00017.74
8.1.20.0040.00417.85
8.1.10.0000.00717.73
8.1.00.0000.00817.72
8.0.300.0040.00419.97
8.0.290.0000.00717.43
8.0.280.0070.00018.41
8.0.270.0000.00717.22
8.0.260.0040.00416.90
8.0.250.0070.00017.09
8.0.240.0030.00516.96
8.0.230.0000.00817.18
8.0.220.0030.00517.04
8.0.210.0070.00017.02
8.0.200.0060.00317.01
8.0.190.0040.00417.11
8.0.180.0060.00316.95
8.0.170.0070.00017.07
8.0.160.0000.00817.05
8.0.150.0050.00316.98
8.0.140.0030.00517.02
8.0.130.0000.00613.45
8.0.120.0040.00417.06
8.0.110.0000.00717.07
8.0.100.0000.00717.08
8.0.90.0000.00816.91
8.0.80.0000.01416.96
8.0.70.0030.00317.04
8.0.60.0000.00717.13
8.0.50.0000.00817.12
8.0.30.0080.01117.46
8.0.20.0110.00717.49
8.0.10.0040.00417.05
8.0.00.0070.01016.91
7.4.330.0000.00616.85
7.4.320.0030.00316.73
7.4.300.0000.00716.84
7.4.290.0040.00416.88
7.4.280.0030.00516.71
7.4.270.0070.00016.74
7.4.260.0030.00313.49
7.4.250.0080.00316.73
7.4.240.0070.00016.74
7.4.230.0000.00716.89
7.4.220.0090.01816.72
7.4.210.0060.01216.78
7.4.200.0030.00516.85
7.4.190.0000.00716.70
7.4.160.0060.00916.90
7.4.150.0060.01217.40
7.4.140.0100.01017.86
7.4.130.0090.00816.65
7.4.120.0050.01616.78
7.4.110.0100.00716.85
7.4.100.0070.01116.89
7.4.90.0100.01316.61
7.4.80.0130.00319.39
7.4.70.0110.00716.72
7.4.60.0150.00316.69
7.4.50.0090.00016.71
7.4.40.0150.00022.77
7.4.30.0150.00616.79
7.4.00.0030.01315.26
7.3.330.0020.00213.46
7.3.320.0040.00313.52
7.3.310.0040.00416.55
7.3.300.0000.00716.44
7.3.290.0000.01316.52
7.3.280.0060.01016.52
7.3.270.0070.01017.40
7.3.260.0070.01018.24
7.3.250.0100.00716.60
7.3.240.0070.01016.53
7.3.230.0100.00716.89
7.3.210.0040.01816.46
7.3.200.0100.01519.39
7.3.190.0060.01616.61
7.3.180.0120.00316.93
7.3.170.0150.00316.60
7.3.160.0200.00416.81
7.3.120.0050.01314.80
7.3.110.0070.01115.30
7.3.100.0170.00015.19
7.3.90.0030.00715.07
7.3.80.0030.01315.04
7.3.70.0030.00614.90
7.3.60.0030.00614.73
7.3.50.0000.00915.16
7.3.40.0090.00314.82
7.3.30.0100.00614.81
7.3.20.0110.00016.88
7.3.10.0030.01016.59
7.3.00.0030.00616.46
7.2.330.0070.01016.82
7.2.320.0100.01316.94
7.2.310.0140.00416.89
7.2.300.0090.00916.77
7.2.290.0100.01416.63
7.2.250.0070.01315.09
7.2.240.0090.00914.92
7.2.230.0110.00314.97
7.2.220.0070.00715.00
7.2.210.0070.00715.35
7.2.200.0040.00815.07
7.2.190.0060.00915.31
7.2.180.0100.00315.15
7.2.170.0000.01515.27
7.2.00.0250.00419.59
7.1.330.0040.01115.68
7.1.320.0040.01215.73
7.1.310.0040.01116.04
7.1.300.0030.01416.11
7.1.290.0060.00615.98
7.1.280.0080.00416.13
7.1.270.0040.00715.91
7.1.260.0060.00915.91
7.1.100.0030.01018.23
7.1.70.0040.00417.46
7.1.60.0070.01719.17
7.1.50.0070.00417.13
7.1.00.0000.05322.32
7.0.200.0040.00414.95
7.0.140.0130.06322.09
7.0.100.0070.06020.04
7.0.90.0070.08019.90
7.0.80.0170.03719.86
7.0.70.0070.07720.00
7.0.60.0030.07019.97
7.0.50.0070.04720.26
7.0.40.0100.04320.14
7.0.30.0100.08020.04
7.0.20.0130.06320.13
7.0.10.0030.08320.04
7.0.00.0030.08020.14
5.6.280.0100.06721.15
5.6.250.0130.03720.82
5.6.240.0230.07320.63
5.6.230.0100.07720.59
5.6.220.0100.07020.67
5.6.210.0100.07020.69
5.6.200.0130.08021.11
5.6.190.0070.05021.02
5.6.180.0070.08021.05
5.6.170.0070.08321.11
5.6.160.0030.06721.18
5.6.150.0070.08021.01
5.6.140.0100.06321.11
5.6.130.0070.09021.06
5.6.120.0130.08321.02
5.6.110.0100.05721.15
5.6.100.0100.04321.02
5.6.90.0070.04021.00
5.6.80.0000.04320.42
5.6.70.0070.03720.46
5.6.60.0070.03720.48
5.6.50.0070.05320.55
5.6.40.0030.06320.39
5.6.30.0070.03720.43
5.6.20.0130.06020.36
5.6.10.0000.04720.29
5.6.00.0030.04020.31
5.5.380.0100.06720.46
5.5.370.0070.06020.41
5.5.360.0070.08020.54
5.5.350.0000.08320.46
5.5.340.0030.05020.91
5.5.330.0070.07720.95
5.5.320.0130.03720.93
5.5.310.0070.07720.71
5.5.300.0170.07720.64
5.5.290.0170.07720.84
5.5.280.0030.08020.91
5.5.270.0000.05020.64
5.5.260.0130.06020.89
5.5.250.0030.04320.75
5.5.240.0030.03720.23
5.5.230.0030.04720.18
5.5.220.0030.04020.27
5.5.210.0000.05320.02
5.5.200.0070.03720.27
5.5.190.0070.06020.13
5.5.180.0030.03720.18
5.5.160.0030.04020.09
5.5.150.0070.04020.14
5.5.140.0070.07020.15
5.5.130.0070.03720.00
5.5.120.0030.04320.23
5.5.110.0070.05720.21
5.5.100.0100.07720.07
5.5.90.0030.04020.09
5.5.80.0070.04020.12
5.5.70.0030.04020.06
5.5.60.0070.03720.04
5.5.50.0070.03020.04
5.5.40.0000.04020.04
5.5.30.0030.03719.93
5.5.20.0030.04320.09
5.5.10.0030.03720.07
5.5.00.0100.06020.07
5.4.450.0070.08019.38
5.4.440.0070.08019.20
5.4.430.0030.04319.21
5.4.420.0000.04319.44
5.4.410.0030.04019.32
5.4.400.0030.03719.24
5.4.390.0070.03719.03
5.4.380.0030.04319.05
5.4.370.0030.03719.01
5.4.360.0030.03319.23
5.4.350.0070.05719.05
5.4.340.0000.07719.07
5.4.320.0070.04319.09
5.4.310.0100.04018.95
5.4.300.0070.04318.89
5.4.290.0070.03318.87
5.4.280.0030.04019.12
5.4.270.0070.03319.09
5.4.260.0030.06319.02
5.4.250.0100.04718.84
5.4.240.0000.04019.20
5.4.230.0030.03718.84
5.4.220.0030.03719.18
5.4.210.0070.06719.15
5.4.200.0030.04018.89
5.4.190.0030.03319.15
5.4.180.0030.03719.21
5.4.170.0000.03718.91
5.4.160.0000.03719.03
5.4.150.0070.03719.00
5.4.140.0070.03016.20
5.4.130.0000.04316.27
5.4.120.0030.04016.34
5.4.110.0030.07316.47
5.4.100.0100.07016.36
5.4.90.0030.07316.42
5.4.80.0100.06716.41
5.4.70.0070.06716.48
5.4.60.0100.06716.40
5.4.50.0130.04316.29
5.4.40.0100.07316.36
5.4.30.0100.07016.31
5.4.20.0100.06316.48
5.4.10.0070.07316.39
5.4.00.0030.07315.85
5.3.290.0070.03714.61
5.3.280.0030.06714.61
5.3.270.0070.03314.63
5.3.260.0000.04014.57
5.3.250.0030.04014.54
5.3.240.0070.03314.69
5.3.230.0070.04014.70
5.3.220.0030.04714.66
5.3.210.0070.05314.52
5.3.200.0070.03714.62
5.3.190.0300.05014.53
5.3.180.0070.07014.59
5.3.170.0030.07314.59
5.3.160.0130.06714.59
5.3.150.0030.04714.57
5.3.140.0100.07314.65
5.3.130.0100.07314.62
5.3.120.0100.07314.61
5.3.110.0030.04714.46
5.3.100.0000.05714.10
5.3.90.0000.04014.09
5.3.80.0030.07013.90
5.3.70.0030.07713.94
5.3.60.0070.07014.03
5.3.50.0130.05013.99
5.3.40.0030.08013.88
5.3.30.0070.05713.89
5.3.20.0000.07713.61
5.3.10.0100.06313.71
5.3.00.0070.07713.62
5.2.170.0030.06311.54
5.2.160.0070.05711.54
5.2.150.0200.04711.54
5.2.140.0100.05711.54
5.2.130.0100.05711.54
5.2.120.0030.04711.54
5.2.110.0030.05011.54
5.2.100.0100.03011.54
5.2.90.0030.06311.54
5.2.80.0070.06011.54
5.2.70.0070.03311.54
5.2.60.0070.05711.54
5.2.50.0030.03711.54
5.2.40.0030.06311.54
5.2.30.0070.05311.54
5.2.20.0030.05311.54
5.2.10.0100.05311.54
5.2.00.0070.05711.54
5.1.60.0000.05311.54
5.1.50.0000.05011.54
5.1.40.0030.04011.54
5.1.30.0000.04011.54
5.1.20.0070.05711.54
5.1.10.0030.05311.54
5.1.00.0000.06011.54
5.0.50.0000.03711.54
5.0.40.0030.04311.54
5.0.30.0070.06311.54
5.0.20.0070.04711.54
5.0.10.0030.04311.54
5.0.00.0030.06311.54
4.4.90.0030.03311.54
4.4.80.0070.03311.54
4.4.70.0130.02311.54
4.4.60.0000.04011.54
4.4.50.0000.03711.54
4.4.40.0030.05311.54
4.4.30.0000.02011.54
4.4.20.0030.03311.54
4.4.10.0000.03711.54
4.4.00.0000.03711.54
4.3.110.0000.03311.54
4.3.100.0030.03311.54
4.3.90.0030.03311.54
4.3.80.0000.05311.54
4.3.70.0000.03311.54
4.3.60.0030.03311.54
4.3.50.0030.02711.54
4.3.40.0030.04311.54
4.3.30.0070.02711.54
4.3.20.0000.03711.54
4.3.10.0000.03711.54
4.3.00.0000.03011.54

preferences:
52.37 ms | 400 KiB | 5 Q