3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mail { public $myMail; private $errors = array(); public function send(){ if(!$this->myMail){ $this->errors[] = 'myMail is not defined'; return FALSE; } return TRUE; } public function getErrors(){ if(count($this->errors)>0){ return $this->errors; } return NULL; } } $mail = new Mail(); //$mail->myMail = 'test@test.com'; $snd = $mail->send(); if($mail->getErrors()){ foreach($mail->errors() as $error){ echo "$error<br>"; } }

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.60.0120.00616.63
8.3.50.0120.00522.11
8.3.40.0060.00818.98
8.3.30.0090.00619.04
8.3.20.0030.00620.16
8.3.10.0030.00623.36
8.3.00.0040.00418.83
8.2.180.0120.00916.75
8.2.170.0140.00022.96
8.2.160.0110.00420.47
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.81
8.2.110.0030.00622.13
8.2.100.0040.00818.03
8.2.90.0040.00419.36
8.2.80.0030.00617.97
8.2.70.0080.00017.75
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0050.00218.27
8.2.20.0050.00317.81
8.2.10.0040.00418.05
8.2.00.0030.00617.81
8.1.280.0090.00925.92
8.1.270.0100.00023.79
8.1.260.0150.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00423.77
8.1.230.0040.00719.15
8.1.220.0040.00417.76
8.1.210.0000.00818.77
8.1.200.0000.00917.47
8.1.190.0030.00517.22
8.1.180.0030.00518.10
8.1.170.0080.00018.53
8.1.160.0080.00022.04
8.1.150.0050.00318.62
8.1.140.0040.00417.38
8.1.130.0030.00517.72
8.1.120.0000.00717.40
8.1.110.0030.00517.30
8.1.100.0040.00417.43
8.1.90.0000.00817.48
8.1.80.0030.00317.51
8.1.70.0000.00717.43
8.1.60.0050.00317.51
8.1.50.0030.00517.54
8.1.40.0050.00317.42
8.1.30.0000.00817.64
8.1.20.0000.00717.69
8.1.10.0030.00517.52
8.1.00.0000.00717.38
8.0.300.0000.00720.65
8.0.290.0030.00616.75
8.0.280.0030.00318.52
8.0.270.0000.00817.27
8.0.260.0070.00017.01
8.0.250.0000.00716.98
8.0.240.0000.00717.02
8.0.230.0070.00017.02
8.0.220.0040.00416.98
8.0.210.0000.00716.96
8.0.200.0000.00917.05
8.0.190.0000.00817.04
8.0.180.0000.00716.93
8.0.170.0060.00317.03
8.0.160.0040.00416.94
8.0.150.0040.00417.02
8.0.140.0020.00516.95
8.0.130.0060.00013.41
8.0.120.0040.00416.96
8.0.110.0080.00016.98
8.0.100.0000.00717.04
8.0.90.0080.00016.82
8.0.80.0070.00716.92
8.0.70.0050.00216.94
8.0.60.0000.00717.00
8.0.50.0000.00717.04
8.0.30.0140.00617.16
8.0.20.0080.01117.40
8.0.10.0040.00416.89
8.0.00.0100.01216.73
7.4.330.0020.00215.02
7.4.320.0040.00416.58
7.4.300.0060.00016.51
7.4.290.0070.00016.54
7.4.280.0000.00616.50
7.4.270.0030.00316.54
7.4.260.0030.00616.48
7.4.250.0040.00416.59
7.4.240.0030.00516.53
7.4.230.0030.00316.47
7.4.220.0150.00416.48
7.4.210.0060.00916.58
7.4.200.0070.00016.34
7.4.190.0000.00716.51
7.4.160.0090.00616.61
7.4.150.0130.00617.40
7.4.140.0100.00817.86
7.4.130.0120.00516.40
7.4.120.0130.00516.54
7.4.110.0070.01416.55
7.4.100.0070.01116.63
7.4.90.0120.00616.48
7.4.80.0100.01319.39
7.4.70.0090.00816.52
7.4.60.0160.00616.50
7.4.50.0030.00616.72
7.4.40.0100.00716.63
7.4.30.0120.00616.42
7.4.00.0070.01115.09
7.3.330.0000.00513.30
7.3.320.0070.00013.38
7.3.310.0000.00816.42
7.3.300.0000.00716.39
7.3.290.0070.00716.36
7.3.280.0090.00916.34
7.3.270.0140.00317.40
7.3.260.0150.00916.55
7.3.250.0080.00816.40
7.3.240.0090.01216.50
7.3.230.0070.01016.40
7.3.210.0100.00716.49
7.3.200.0090.00616.44
7.3.190.0150.00316.40
7.3.180.0090.00716.44
7.3.170.0080.00816.59
7.3.160.0070.01616.57
7.3.120.0040.01114.89
7.2.330.0110.00716.66
7.2.320.0150.00316.77
7.2.310.0110.00616.77
7.2.300.0110.00616.71
7.2.290.0180.00616.72
7.2.60.0110.00416.92
7.2.50.0120.00016.89
7.2.00.0040.00819.46
7.1.200.0180.00315.32
7.1.70.0070.00717.16
7.1.60.0000.01117.27
7.1.50.0060.01616.74
7.1.00.0100.07022.31
7.0.200.0050.01116.74
7.0.140.0070.07021.92
7.0.60.0130.07720.07
7.0.50.0070.05717.84
7.0.40.0130.06020.28
7.0.30.0270.07720.15
7.0.20.0330.06320.10
7.0.10.0170.07020.10
7.0.00.0070.07320.06
5.6.280.0130.06720.79
5.6.210.0030.08320.65
5.6.200.0070.07318.13
5.6.190.0070.07720.64
5.6.180.0200.04720.50
5.6.170.0170.05320.68
5.6.160.0100.08020.50
5.6.150.0070.04718.17
5.6.140.0030.04318.28
5.6.130.0070.07718.19
5.6.120.0070.07020.99
5.6.110.0100.05320.86
5.6.100.0100.08321.05
5.6.90.0030.04721.13
5.6.80.0130.07020.41
5.5.350.4000.04320.53
5.5.340.0070.04017.99
5.5.330.0070.05320.30
5.5.320.0200.04020.35
5.5.310.0230.03720.34
5.5.300.0130.07317.95
5.5.290.0070.08018.07
5.5.280.0070.07020.98
5.5.270.0000.04720.98
5.5.260.0200.02720.73
5.5.250.0070.06020.61
5.5.240.0030.08020.13
5.4.450.0270.04019.29
5.4.440.0100.05019.42
5.4.430.0300.04019.38
5.4.420.0330.04319.48
5.4.410.0170.03019.41
5.4.400.0330.03719.24
5.4.390.0170.04319.23
5.4.380.0230.05718.46
5.4.370.0230.06718.83
5.4.360.0270.06018.78
5.4.350.0330.05718.78
5.4.340.0430.04718.79
5.4.320.0070.03512.50
5.4.310.0050.04412.50
5.4.300.0060.04612.50
5.4.290.0050.04412.50
5.4.280.0090.03412.40
5.4.270.0080.04412.40
5.4.260.0080.05312.40
5.4.250.0030.05812.40
5.4.240.0050.05512.40
5.4.230.0080.06612.39
5.4.220.0070.05312.39
5.4.210.0070.05512.39
5.4.200.0070.05712.39
5.4.190.0070.05512.39
5.4.180.0160.07812.39
5.4.170.0150.07712.40
5.4.160.0090.09412.39
5.4.150.0110.05912.39
5.4.140.0160.05512.07
5.4.130.0130.05312.06
5.4.120.0150.05012.02
5.4.110.0090.05412.01
5.4.100.0090.05612.02
5.4.90.0130.05512.02
5.4.80.0090.05112.02
5.4.70.0100.07712.01
5.4.60.0110.05812.02
5.4.50.0100.05512.01
5.4.40.0070.05512.00
5.4.30.0120.04812.00
5.4.20.0090.05112.00
5.4.10.0130.05612.00
5.4.00.0090.05511.49
5.3.290.0050.04112.80
5.3.280.0090.05312.71
5.3.270.0060.05912.72
5.3.260.0110.06512.71
5.3.250.0100.05312.72
5.3.240.0060.05612.72
5.3.230.0080.05212.70
5.3.220.0110.05012.68
5.3.210.0090.04312.68
5.3.200.0130.03812.68
5.3.190.0100.04112.68
5.3.180.0070.04212.67
5.3.170.0070.03812.67
5.3.160.0110.03712.67
5.3.150.0080.04312.68
5.3.140.0090.03912.66
5.3.130.0050.04312.66
5.3.120.0080.04312.66
5.3.110.0090.04512.65
5.3.100.0100.05012.13
5.3.90.0090.05312.11
5.3.80.0090.03912.10
5.3.70.0090.04312.10
5.3.60.0060.05012.09
5.3.50.0040.05412.03
5.3.40.0080.04712.04
5.3.30.0090.04811.99
5.3.20.0060.04311.77
5.3.10.0040.04211.74
5.3.00.0060.03911.72
5.2.170.0060.0319.23
5.2.160.0040.0309.23
5.2.150.0030.0329.23
5.2.140.0020.0339.23
5.2.130.0040.0309.19
5.2.120.0070.0269.19
5.2.110.0060.0309.20
5.2.100.0070.0289.19
5.2.90.0050.0299.19
5.2.80.0060.0289.18
5.2.70.0050.0319.18
5.2.60.0050.0319.13
5.2.50.0060.0289.10
5.2.40.0040.0299.08
5.2.30.0040.0309.06
5.2.20.0060.0279.05
5.2.10.0030.0298.95
5.2.00.0040.0308.82
5.1.60.0060.0248.09
5.1.50.0070.0238.09
5.1.40.0060.0248.07
5.1.30.0040.0348.43
5.1.20.0050.0348.45
5.1.10.0020.0308.17
5.1.00.0070.0238.17
5.0.50.0040.0216.65
5.0.40.0060.0186.51
5.0.30.0050.0326.32
5.0.20.0090.0266.29
5.0.10.0060.0286.27
5.0.00.0030.0366.26
4.4.90.0030.0204.78
4.4.80.0040.0264.76
4.4.70.0040.0224.75
4.4.60.0040.0244.75
4.4.50.0050.0254.77
4.4.40.0120.0504.71
4.4.30.0020.0424.76
4.4.20.0050.0224.85
4.4.10.0060.0254.85
4.4.00.0020.0354.76
4.3.110.0020.0244.67
4.3.100.0040.0174.67
4.3.90.0010.0184.63
4.3.80.0010.0264.59
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0040.0144.63
4.3.40.0060.0244.54
4.3.30.0020.0223.30
4.3.20.0000.0203.28
4.3.10.0030.0163.23
4.3.00.0030.01718.64

preferences:
42.92 ms | 401 KiB | 5 Q