3v4l.org

run code in 300+ PHP versions simultaneously
<?php class friendList { private $friends; public function __construct(array $names){ $this->friends = array(); if($names) foreach($names as $name) $this->addFriend($name); } public function addFriend($name) { $this->friends[] = $name; } public function getFriends() { return $this->friends; } } $friends = new friendList(['Eric','Dan','Lisa']); function funtimes($friends) { echo implode(", ", $friends->getFriends()) . "\n"; $friends->addFriend('John'); } funtimes($friends); var_dump($friends);

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.70.0090.00616.73
8.3.60.0070.00716.50
8.3.50.0150.00922.99
8.3.40.0150.00018.88
8.3.30.0040.01119.03
8.3.20.0040.00420.04
8.3.10.0040.00423.65
8.3.00.0080.00017.50
8.2.180.0180.00418.18
8.2.170.0150.00622.96
8.2.160.0090.00618.79
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00321.09
8.2.110.0060.00322.25
8.2.100.0040.00717.91
8.2.90.0100.00019.22
8.2.80.0080.00017.97
8.2.70.0070.00317.63
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0030.00519.88
8.2.30.0030.00518.18
8.2.20.0000.00817.80
8.2.10.0060.00318.02
8.2.00.0030.00617.73
8.1.280.0100.01025.92
8.1.270.0040.00423.96
8.1.260.0060.00326.35
8.1.250.0050.00228.09
8.1.240.0050.00523.70
8.1.230.0000.01019.22
8.1.220.0000.00817.77
8.1.210.0000.00818.77
8.1.200.0100.00017.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0080.00018.51
8.1.160.0000.00721.86
8.1.150.0080.00018.89
8.1.140.0000.00717.44
8.1.130.0070.00017.83
8.1.120.0000.00717.51
8.1.110.0040.00417.34
8.1.100.0030.00517.50
8.1.90.0000.00717.48
8.1.80.0000.00717.32
8.1.70.0030.00517.44
8.1.60.0030.00517.54
8.1.50.0040.00417.41
8.1.40.0000.00817.54
8.1.30.0000.00817.61
8.1.20.0000.00817.61
8.1.10.0000.00717.55
8.1.00.0070.00017.40
8.0.300.0050.00318.77
8.0.290.0000.00716.75
8.0.280.0000.00718.43
8.0.270.0000.00817.25
8.0.260.0000.00617.25
8.0.250.0030.00316.99
8.0.240.0040.00416.95
8.0.230.0040.00416.98
8.0.220.0000.00716.80
8.0.210.0070.00016.87
8.0.200.0030.00316.96
8.0.190.0000.00816.82
8.0.180.0070.00016.80
8.0.170.0040.00416.93
8.0.160.0000.00816.81
8.0.150.0050.00216.89
8.0.140.0040.00416.81
8.0.130.0000.00513.38
8.0.120.0000.00816.75
8.0.110.0080.00016.80
8.0.100.0040.00416.92
8.0.90.0000.00716.80
8.0.80.0120.00316.81
8.0.70.0050.00216.82
8.0.60.0080.00016.79
8.0.50.0000.00717.00
8.0.30.0090.01316.96
8.0.20.0030.01617.40
8.0.10.0040.00416.86
8.0.00.0100.01016.92
7.4.330.0000.00515.08
7.4.320.0070.00016.48
7.4.300.0060.00016.48
7.4.290.0070.00016.55
7.4.280.0040.00416.59
7.4.270.0040.00416.64
7.4.260.0070.00316.57
7.4.250.0040.00416.55
7.4.240.0020.00516.47
7.4.230.0070.00016.40
7.4.220.0070.01116.62
7.4.210.0040.01216.57
7.4.200.0070.00016.25
7.4.160.0060.01016.64
7.4.150.0140.00417.40
7.4.140.0100.01017.86
7.4.130.0100.00716.54
7.4.120.0110.00616.47
7.4.110.0100.00716.54
7.4.100.0090.00616.52
7.4.90.0070.01116.41
7.4.80.0140.00419.39
7.4.70.0070.01316.53
7.4.60.0070.01116.38
7.4.50.0060.00316.26
7.4.40.0080.00816.35
7.4.30.0000.01616.33
7.4.00.0040.01215.11
7.3.330.0070.00013.22
7.3.320.0000.00813.32
7.3.310.0000.00716.14
7.3.300.0000.00716.29
7.3.290.0100.00716.32
7.3.280.0090.01116.29
7.3.270.0100.00717.40
7.3.260.0070.01216.31
7.3.250.0160.00216.65
7.3.240.0130.01016.34
7.3.230.0140.00316.56
7.3.210.0000.01616.59
7.3.200.0150.00719.39
7.3.190.0060.01016.58
7.3.180.0090.00616.41
7.3.170.0140.00316.27
7.3.160.0060.01016.27
7.2.330.0060.01216.68
7.2.320.0100.00716.69
7.2.310.0140.01016.57
7.2.300.0150.00316.62
7.2.290.0120.01216.80
7.2.60.0120.00316.99
7.2.00.0090.00619.55
7.1.200.0060.00615.75
7.1.100.0060.00617.96
7.1.70.0050.00517.25
7.1.60.0060.01919.40
7.1.50.0060.00616.69
7.1.00.0070.07322.31
7.0.200.0640.00614.81
7.0.140.0130.06322.16
7.0.60.0200.07020.05
7.0.50.0030.08317.73
7.0.40.0100.04020.10
7.0.30.0670.05720.13
7.0.20.0270.06720.09
7.0.10.0130.05020.16
7.0.00.0200.07320.22
5.6.280.0030.07321.13
5.6.210.0030.04020.68
5.6.200.0100.07718.19
5.6.190.0030.06320.41
5.6.180.0200.04020.41
5.6.170.0370.06720.50
5.6.160.0070.04020.57
5.6.150.0000.05318.25
5.6.140.0070.04018.28
5.6.130.0030.08318.18
5.6.120.0170.07320.90
5.6.110.0030.07321.02
5.6.100.0030.04321.05
5.6.90.0030.04021.03
5.6.80.0100.06320.41
5.5.350.2870.03020.44
5.5.340.0130.07017.95
5.5.330.0070.07020.33
5.5.320.0330.08720.21
5.5.310.0270.04720.37
5.5.300.0070.06317.92
5.5.290.0070.08018.01
5.5.280.0070.05020.79
5.5.270.0100.03320.89
5.5.260.0100.08320.89
5.5.250.0100.04020.77
5.5.240.0270.05720.20
5.4.450.0770.05019.39
5.4.440.0670.04319.33
5.4.430.0400.03719.54
5.4.420.0270.03719.36
5.4.410.0670.03019.35
5.4.400.0170.03719.17
5.4.390.0570.04719.19
5.4.380.0870.05318.48
5.4.370.0870.05018.63
5.4.360.0630.07318.60
5.4.350.0800.06318.41
5.4.340.0900.07018.48
5.4.320.0080.03412.51
5.4.310.0040.03912.50
5.4.300.0070.03812.51
5.4.290.0070.03812.50
5.4.280.0050.03712.40
5.4.270.0060.03812.40
5.4.260.0070.03712.41
5.4.250.0060.03912.41
5.4.240.0110.03612.40
5.4.230.0060.04012.40
5.4.220.0050.03912.40
5.4.210.0070.03812.39
5.4.200.0090.04712.39
5.4.190.0050.05312.39
5.4.180.0080.03412.39
5.4.170.0090.03412.40
5.4.160.0050.03712.39
5.4.150.0040.03812.39
5.4.140.0090.03612.07
5.4.130.0060.03612.06
5.4.120.0060.03512.02
5.4.110.0060.03612.01
5.4.100.0060.03512.02
5.4.90.0040.03912.02
5.4.80.0070.03612.01
5.4.70.0070.03812.01
5.4.60.0070.03512.01
5.4.50.0080.03412.01
5.4.40.0080.03712.00
5.4.30.0110.03012.00
5.4.20.0060.03612.00
5.4.10.0080.03211.99
5.4.00.0060.03811.48
5.3.290.0050.04612.80
5.3.280.0090.04212.71
5.3.270.0080.04012.73
5.3.260.0080.03712.72
5.3.250.0060.03812.71
5.3.240.0070.04212.71
5.3.230.0060.03912.71
5.3.220.0050.03812.68
5.3.210.0090.03612.68
5.3.200.0060.04212.68
5.3.190.0070.03912.68
5.3.180.0080.04112.68
5.3.170.0130.04312.67
5.3.160.0100.03512.67
5.3.150.0080.03812.67
5.3.140.0100.04312.66
5.3.130.0030.04412.66
5.3.120.0070.03812.65
5.3.110.0080.03912.66
5.3.100.0110.03512.13
5.3.90.0070.03912.11
5.3.80.0050.03812.10
5.3.70.0090.04312.10
5.3.60.0100.03212.09
5.3.50.0070.03512.03
5.3.40.0030.04012.03
5.3.30.0110.03111.99
5.3.20.0060.03511.77
5.3.10.0070.03411.74
5.3.00.0060.03611.72
5.2.170.0100.0259.22
5.2.160.0040.0299.23
5.2.150.0050.0309.23
5.2.140.0080.0289.22
5.2.130.0050.0299.18
5.2.120.0060.0279.18
5.2.110.0050.0299.19
5.2.100.0050.0429.19
5.2.90.0100.0379.18
5.2.80.0070.0289.19
5.2.70.0020.0339.18
5.2.60.0040.0319.13
5.2.50.0030.0339.10
5.2.40.0030.0309.07
5.2.30.0050.0299.06
5.2.20.0050.0399.05
5.2.10.0070.0378.95
5.2.00.0020.0308.82
5.1.60.0040.0258.09
5.1.50.0020.0288.09
5.1.40.0050.0248.07
5.1.30.0030.0278.43
5.1.20.0030.0288.45
5.1.10.0060.0278.17
5.1.00.0050.0298.17
5.0.50.0060.0186.64
5.0.40.0040.0196.50
5.0.30.0050.0296.31
5.0.20.0030.0196.28
5.0.10.0050.0186.26
5.0.00.0040.0306.25
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0040.0154.75
4.4.60.0000.0184.75
4.4.50.0020.0164.77
4.4.40.0020.0264.70
4.4.30.0030.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0164.85
4.4.00.0040.0284.76
4.3.110.0020.0164.67
4.3.100.0010.0164.66
4.3.90.0020.0164.63
4.3.80.0020.0254.58
4.3.70.0030.0144.63
4.3.60.0030.0184.63
4.3.50.0040.0174.63
4.3.40.0040.0224.54
4.3.30.0020.0163.30
4.3.20.0000.0193.28
4.3.10.0020.0163.23
4.3.00.0030.01715.62

preferences:
63.07 ms | 401 KiB | 5 Q