3v4l.org

run code in 300+ PHP versions simultaneously
<?php class mcl { public function special_functions($occurances) { $replace_html = ''; if($occurances) { switch ($occurances[1]) { case 'text and text': $replace_html = 'NOTEPAD'; break; case 'code and code': $replace_html = 'PHP'; break; default: $replace_html =''; break; } } return $replace_html; } public function dosomething() { $data = 'you will have a {{text and text}} in such a format to do {{code and code}}'; $data = preg_replace_callback('/{{([^{}]*)}}/', array($this, 'special_functions'), $data); return $data; } } $o = new mcl(); echo $o->dosomething();

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.140.0160.00617.87
8.4.130.0120.00918.01
8.4.120.0080.00124.16
8.4.110.0130.00722.37
8.4.100.0110.00918.85
8.4.90.0110.00719.00
8.4.80.0060.00218.69
8.4.70.0130.00718.01
8.4.60.0110.01118.78
8.4.50.0130.00718.00
8.4.40.0100.01019.73
8.4.30.0030.00618.12
8.4.20.0100.01020.33
8.4.10.0060.00317.80
8.3.270.0140.00616.63
8.3.260.0060.00416.68
8.3.250.0130.00618.93
8.3.240.0100.00817.23
8.3.230.0110.00716.76
8.3.220.0140.00518.71
8.3.210.0060.00218.54
8.3.200.0050.00416.50
8.3.190.0050.00317.05
8.3.180.0110.00818.43
8.3.170.0070.01116.53
8.3.160.0090.00916.74
8.3.150.0100.01018.54
8.3.140.0080.00018.94
8.3.130.0060.01316.64
8.3.120.0170.00318.96
8.3.110.0040.01116.70
8.3.100.0130.00724.06
8.3.90.0000.00826.77
8.3.80.0030.00618.28
8.3.70.0090.00616.36
8.3.60.0040.01218.55
8.3.50.0060.00818.50
8.3.40.0100.00718.78
8.3.30.0120.00318.84
8.3.20.0000.00818.85
8.3.10.0040.00421.85
8.3.00.0060.00323.62
8.2.290.0130.00620.45
8.2.280.0150.00418.68
8.2.270.0000.00817.07
8.2.260.0080.00016.67
8.2.250.0040.00416.91
8.2.240.0070.00417.25
8.2.230.0050.00320.94
8.2.220.0060.00337.54
8.2.210.0070.01126.77
8.2.200.0090.00016.63
8.2.190.0110.00416.75
8.2.180.0130.00617.00
8.2.170.0150.00022.96
8.2.160.0070.01119.05
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.90
8.2.110.0060.00322.37
8.2.100.0120.00018.03
8.2.90.0050.00318.11
8.2.80.0040.00419.27
8.2.70.0040.00418.03
8.2.60.0000.00818.16
8.2.50.0050.00518.10
8.2.40.0040.00420.65
8.2.30.0000.00720.73
8.2.20.0000.00718.14
8.2.10.0050.00218.23
8.2.00.0040.00418.13
8.1.330.0120.00722.21
8.1.320.0100.00916.27
8.1.310.0050.00318.63
8.1.300.0060.01320.03
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0060.00323.90
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0080.00023.98
8.1.230.0100.00322.75
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0000.01017.60
8.1.190.0060.00317.48
8.1.180.0080.00018.10
8.1.170.0050.00318.67
8.1.160.0040.00418.92
8.1.150.0040.00418.84
8.1.140.0000.00718.90
8.1.130.0070.00020.30
8.1.120.0040.00417.64
8.1.110.0110.00017.63
8.1.100.0000.00917.65
8.1.90.0060.00317.53
8.1.80.0040.00417.51
8.1.70.0000.00717.53
8.1.60.0090.00017.75
8.1.50.0000.00817.73
8.1.40.0060.00317.57
8.1.30.0080.00017.88
8.1.20.0040.00417.71
8.1.10.0060.00618.50
8.1.00.0000.00817.62
8.0.300.0040.00422.08
8.0.290.0090.00016.88
8.0.280.0080.00018.48
8.0.270.0070.00017.29
8.0.260.0060.00321.92
8.0.250.0000.00817.14
8.0.240.0040.00417.01
8.0.230.0040.00417.11
8.0.220.0060.00317.04
8.0.210.0000.00717.05
8.0.200.0030.00317.04
8.0.190.0080.00317.04
8.0.180.0040.00417.06
8.0.170.0000.00816.95
8.0.160.0040.00417.17
8.0.150.0070.00017.00
8.0.140.0040.00417.07
8.0.130.0000.00613.50
8.0.120.0030.00617.02
8.0.110.0050.00316.96
8.0.100.0040.00417.01
8.0.90.0000.00817.04
8.0.80.0090.00617.00
8.0.70.0000.00816.93
8.0.60.0080.00017.05
8.0.50.0000.00716.98
8.0.30.0120.00817.01
8.0.20.0070.01317.55
8.0.10.0020.00517.07
8.0.00.0100.00717.19
7.4.330.0020.00215.55
7.4.320.0060.00016.74
7.4.300.0000.00716.68
7.4.290.0040.00416.62
7.4.280.0070.00016.75
7.4.270.0070.00016.74
7.4.260.0060.00316.73
7.4.250.0000.00716.68
7.4.240.0050.00216.70
7.4.230.0030.00316.85
7.4.220.0040.00416.78
7.4.210.0070.01016.78
7.4.200.0000.00916.86
7.4.160.0080.01116.72
7.4.140.0090.00917.86
7.4.130.0110.01116.78
7.4.120.0110.00816.80
7.4.110.0130.01016.72
7.4.100.0030.01316.72
7.4.90.0140.00316.85
7.4.80.0120.00519.39
7.4.70.0120.00316.50
7.4.60.0100.01016.55
7.4.50.0030.01416.79
7.4.40.0030.02216.54
7.4.10.0070.01016.63
7.4.00.0050.01416.07
7.3.330.0030.00313.31
7.3.320.0000.00613.52
7.3.310.0040.00416.58
7.3.300.0000.00816.51
7.3.290.0130.00316.50
7.3.280.0030.01216.49
7.3.260.0110.01216.61
7.3.240.0110.00616.61
7.3.230.0100.00716.84
7.3.210.0060.01216.78
7.3.200.0030.01316.77
7.3.190.0030.01316.61
7.3.180.0100.00716.68
7.3.170.0100.00716.51
7.3.160.0100.01316.84
7.3.130.0070.01116.52
7.3.120.0120.00816.44
7.3.110.0040.01216.75
7.3.100.0030.01216.45
7.3.90.0040.00816.55
7.3.80.0060.01016.37
7.3.70.0030.01316.48
7.3.60.0090.00616.60
7.3.50.0060.01016.54
7.3.40.0060.00916.60
7.3.30.0060.01216.49
7.3.20.0150.00018.53
7.3.10.0090.00318.25
7.3.00.0040.00718.42
7.2.330.0110.00816.75
7.2.320.0100.00716.81
7.2.310.0060.00917.02
7.2.300.0070.01016.88
7.2.290.0090.00616.97
7.2.260.0090.00616.89
7.2.250.0110.00716.71
7.2.240.0030.01016.79
7.2.230.0060.00616.89
7.2.220.0040.00816.72
7.2.210.0000.01216.89
7.2.200.0060.00616.72
7.2.190.0030.01216.70
7.2.180.0070.00416.79
7.2.170.0030.01216.85
7.2.160.0090.00616.77
7.2.150.0100.00318.82
7.2.140.0110.00318.41
7.2.130.0030.01118.76
7.2.120.0100.00718.71
7.2.110.0130.00717.67
7.2.100.0530.01016.69
7.2.90.0520.00716.79
7.2.80.0420.00916.77
7.2.70.0500.00716.84
7.2.60.0540.00616.92
7.2.50.0810.01016.92
7.2.40.0630.00316.81
7.2.30.0500.01217.08
7.2.20.0470.00516.95
7.2.10.0390.01216.83
7.2.00.0510.00316.88
7.1.330.0060.01017.57
7.1.320.0070.00317.58
7.1.310.0040.00717.41
7.1.300.0090.00317.75
7.1.290.0060.00917.42
7.1.280.0090.00617.47
7.1.270.0070.00717.70
7.1.260.0030.01217.41
7.1.250.0040.00817.49
7.1.240.0060.01117.36
7.1.230.0030.01417.56
7.1.220.0510.00515.80
7.1.210.0380.00815.84
7.1.200.0420.00915.78
7.1.190.0470.00815.90
7.1.180.0490.00915.81
7.1.170.0500.00715.78
7.1.160.0400.01415.87
7.1.150.0480.00315.84
7.1.140.0480.00415.82
7.1.130.0580.00715.74
7.1.120.0450.00315.81
7.1.110.0390.00815.96
7.1.100.0400.00915.77
7.1.90.0420.00515.69
7.1.80.0540.00715.80
7.1.70.0450.00715.80
7.1.60.0570.01124.68
7.1.50.0630.01024.79
7.1.40.0560.00524.72
7.1.30.0570.00524.63
7.1.20.0600.00624.81
7.1.10.0530.01115.82
7.1.00.0420.00915.69
7.0.330.0070.01017.16
7.0.320.0060.00917.24
7.0.310.0070.01016.90
7.0.300.0090.00317.23
7.0.290.0060.00617.09
7.0.280.0060.01017.21
7.0.270.0030.01017.25
7.0.260.0040.01117.34
7.0.250.0100.00717.32
7.0.240.0070.01017.36
7.0.230.0030.00717.42
7.0.220.0030.01017.13
7.0.210.0040.01117.29
7.0.200.0000.01017.26
7.0.190.0060.00317.23
7.0.180.0080.00417.15
7.0.170.0090.00616.96
7.0.160.0090.00317.29
7.0.150.0070.00717.25
7.0.140.0090.00617.21
7.0.130.0040.01417.10
7.0.120.0040.00717.28
7.0.110.0040.00817.29
7.0.100.0060.00617.21
7.0.90.0050.00817.23
7.0.80.0040.00817.34
7.0.70.0030.01017.23
7.0.60.0050.00517.18
7.0.50.0100.00717.15
7.0.40.0000.01015.18
7.0.30.0060.00615.11
7.0.20.0000.01515.21
7.0.10.0030.01315.18
7.0.00.0090.00615.20
5.6.400.0060.00815.71
5.6.390.0040.01116.34
5.6.380.0090.00915.42
5.6.370.0040.00715.94
5.6.360.0000.01216.20
5.6.350.0060.01316.15
5.6.340.0050.00516.23
5.6.330.0000.01416.11
5.6.320.0090.00616.07
5.6.310.0090.00315.89
5.6.300.0000.01016.22
5.6.290.0060.00915.76
5.6.280.0070.01115.95
5.6.270.0000.01215.74
5.6.260.0060.00916.00
5.6.250.0040.01115.98
5.6.240.0120.00016.10
5.6.230.0070.00716.34
5.6.220.0060.00615.84
5.6.210.0110.00416.07
5.6.200.0000.01015.99
5.6.190.0030.01016.04
5.6.180.0030.00616.38
5.6.170.0070.00316.08
5.6.160.0090.00616.01
5.6.150.0190.00015.85
5.6.140.0030.00816.21
5.6.130.0040.00716.14
5.6.120.0040.00715.79
5.6.110.0100.00015.84
5.6.100.0070.00715.92
5.6.90.0030.00916.01
5.6.80.0140.00015.90
5.6.70.0080.00415.84
5.6.60.0070.00715.81
5.6.50.0080.00415.72
5.6.40.0000.01015.94
5.6.30.0100.00015.82
5.6.20.0070.01115.95
5.6.10.0030.01315.84
5.6.00.0100.00715.99

preferences:
30.69 ms | 403 KiB | 5 Q