3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Stapler { protected $color; public function __construct($color) { $this->color = $color; } public function staple($paper1, $paper2) { echo "the ".$this->color." stapler, staples ".$paper1.' '.$paper2.' together'; } } $redStapler = new Stapler('red'); $blackStapler = new Stapler('black'); $redStapler->staple('cat', 'dog'); echo "\n"; $blackStapler->staple('sign', 'tree');

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.0070.01518.43
8.3.50.0100.00922.89
8.3.40.0070.00718.79
8.3.30.0000.01418.52
8.3.20.0040.00420.16
8.3.10.0070.00021.73
8.3.00.0040.00419.38
8.2.180.0130.00916.75
8.2.170.0090.00622.96
8.2.160.0120.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00022.25
8.2.120.0070.00026.35
8.2.110.0100.00021.96
8.2.100.0070.00717.84
8.2.90.0000.00819.27
8.2.80.0050.00317.97
8.2.70.0050.00517.50
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0060.00318.31
8.2.30.0040.00418.08
8.2.20.0000.00817.75
8.2.10.0000.00718.17
8.2.00.0000.00717.96
8.1.280.0070.01025.92
8.1.270.0080.00023.97
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0000.00920.68
8.1.230.0070.00317.76
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0040.00417.36
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0000.00818.85
8.1.150.0050.00318.89
8.1.140.0050.00219.57
8.1.130.0000.00820.16
8.1.120.0030.00317.47
8.1.110.0000.00717.49
8.1.100.0030.00317.41
8.1.90.0040.00417.38
8.1.80.0040.00417.49
8.1.70.0000.00717.46
8.1.60.0000.00817.57
8.1.50.0000.00817.56
8.1.40.0080.00017.53
8.1.30.0040.00417.67
8.1.20.0050.00217.65
8.1.10.0030.00617.60
8.1.00.0050.00217.49
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0000.00717.31
8.0.260.0030.00318.54
8.0.250.0000.00716.87
8.0.240.0030.00516.95
8.0.230.0030.00516.98
8.0.220.0030.00316.89
8.0.210.0040.00416.94
8.0.200.0030.00316.92
8.0.190.0000.00716.96
8.0.180.0030.00716.91
8.0.170.0040.00416.86
8.0.160.0000.00716.95
8.0.150.0040.00416.83
8.0.140.0070.00016.75
8.0.130.0050.00013.30
8.0.120.0040.00416.75
8.0.110.0040.00416.90
8.0.100.0000.00816.77
8.0.90.0000.00716.95
8.0.80.0040.01116.85
8.0.70.0000.00816.70
8.0.60.0040.00416.77
8.0.50.0040.00416.84
8.0.30.0110.00917.10
8.0.20.0100.00917.40
8.0.10.0030.00517.00
8.0.00.0130.00416.88
7.4.330.0020.00215.08
7.4.320.0070.00016.50
7.4.300.0000.00716.59
7.4.290.0030.00616.55
7.4.280.0000.00816.51
7.4.270.0030.00316.61
7.4.260.0030.00416.58
7.4.250.0000.00716.42
7.4.240.0070.00016.49
7.4.230.0000.00716.51
7.4.220.0120.00916.61
7.4.210.0060.01016.59
7.4.200.0070.00016.61
7.4.160.0120.00316.28
7.4.150.0170.00017.40
7.4.140.0080.01117.86
7.4.130.0080.01116.50
7.4.120.0130.00316.49
7.4.110.0030.02116.59
7.4.100.0070.01016.39
7.4.90.0070.01016.40
7.4.80.0140.00419.39
7.4.70.0110.01116.66
7.4.60.0120.00316.55
7.4.50.0120.00016.25
7.4.40.0130.00416.62
7.4.30.0100.00616.46
7.4.10.0100.01016.35
7.4.00.0090.00515.76
7.3.330.0040.00413.09
7.3.320.0000.00513.30
7.3.310.0000.00716.34
7.3.300.0000.00616.32
7.3.290.0070.00016.30
7.3.280.0090.01016.26
7.3.270.0130.00317.40
7.3.260.0070.01316.38
7.3.250.0110.00716.38
7.3.240.0040.01416.36
7.3.230.0070.01016.55
7.3.210.0030.01316.32
7.3.200.0090.00916.40
7.3.190.0110.00416.57
7.3.180.0060.01616.44
7.3.170.0150.00616.39
7.3.160.0070.01016.21
7.3.130.0060.01016.36
7.3.120.0040.01116.26
7.3.110.0100.00316.30
7.3.100.0040.01116.61
7.3.90.0060.00316.23
7.3.80.0070.01016.32
7.3.70.0070.01016.22
7.3.60.0130.00316.24
7.3.50.0040.01116.43
7.3.40.0030.01016.31
7.3.30.0040.01516.35
7.3.20.0030.00718.12
7.3.10.0060.00318.02
7.3.00.0090.00618.04
7.2.330.0100.00716.82
7.2.320.0000.01916.61
7.2.310.0030.01716.60
7.2.300.0080.00816.47
7.2.290.0140.00716.79
7.2.260.0090.00916.77
7.2.250.0080.00816.86
7.2.240.0000.01316.50
7.2.230.0090.00616.51
7.2.220.0070.01016.31
7.2.210.0030.00716.81
7.2.200.0070.00716.63
7.2.190.0100.00616.39
7.2.180.0000.01316.41
7.2.170.0030.01416.55
7.2.160.0060.01316.66
7.2.150.0030.00618.49
7.2.140.0030.00918.34
7.2.130.0070.01418.35
7.2.120.0100.00318.33
7.2.110.0030.00918.30
7.2.100.0070.00718.48
7.2.90.0070.01018.52
7.2.80.0100.00717.56
7.2.70.0030.01018.28
7.2.60.0140.00717.55
7.2.50.0100.00718.53
7.2.40.0140.00418.43
7.2.30.0000.01118.47
7.2.20.0070.00418.32
7.2.10.0070.00318.52
7.2.00.0140.00418.41
7.1.330.0090.00617.40
7.1.320.0030.00917.15
7.1.310.0000.01417.17
7.1.300.0040.00717.29
7.1.290.0090.00617.29
7.1.280.0050.00917.34
7.1.270.0100.00717.17
7.1.260.0000.01017.39
7.1.250.0070.00717.10
7.1.240.0090.00917.27
7.1.230.0060.00617.23
7.1.220.0070.00717.21
7.1.210.0030.00917.09
7.1.200.0040.00916.46
7.1.190.0070.00717.28
7.1.180.0000.01217.21
7.1.170.0030.01217.26
7.1.160.0130.00417.31
7.1.150.0090.00317.28
7.1.140.0070.00417.39
7.1.130.0000.01117.41
7.1.120.0110.00417.19
7.1.110.0040.01217.01
7.1.100.0100.00317.39
7.1.90.0110.00417.29
7.1.80.0000.01417.20
7.1.70.0040.00517.09
7.1.60.0060.00617.14
7.1.50.0070.00717.28
7.1.40.0030.01017.41
7.1.30.0070.01117.24
7.1.20.0040.00717.19
7.1.10.0060.00317.15
7.1.00.0030.04319.83
7.0.330.0080.00817.26
7.0.320.0070.00717.02
7.0.310.0130.00016.91
7.0.300.0090.00416.97
7.0.290.0070.00716.86
7.0.280.0100.00317.18
7.0.270.0060.00616.80
7.0.260.0000.01616.91
7.0.250.0040.00717.07
7.0.240.0080.00316.93
7.0.230.0090.00317.09
7.0.220.0050.00816.88
7.0.210.0030.01017.01
7.0.200.0050.00616.80
7.0.190.0060.00317.00
7.0.180.0000.01017.13
7.0.170.0070.00716.96
7.0.160.0000.01217.10
7.0.150.0030.00917.01
7.0.140.0030.00817.01
7.0.130.0040.01217.05
7.0.120.0060.00317.12
7.0.110.0030.00616.97
7.0.100.0000.01416.93
7.0.90.0000.01117.11
7.0.80.0110.03418.48
7.0.70.0060.03518.44
7.0.60.0090.03118.53
7.0.50.0020.04018.63
7.0.40.0050.03517.77
7.0.30.0100.03317.53
7.0.20.0100.04217.67
7.0.10.0110.03817.69
7.0.00.0100.03317.60
5.6.400.0070.00416.11
5.6.390.0040.01115.94
5.6.380.0030.01016.05
5.6.370.0080.00416.15
5.6.360.0100.00615.83
5.6.350.0100.00316.01
5.6.340.0000.01415.70
5.6.330.0100.00716.18
5.6.320.0000.01516.07
5.6.310.0070.00715.99
5.6.300.0000.00916.25
5.6.290.0030.01315.97
5.6.280.0090.03318.25
5.6.270.0090.00615.77
5.6.260.0130.00015.75
5.6.250.0030.00615.86
5.6.240.0030.01015.91
5.6.230.0050.03618.20
5.6.220.0080.03218.27
5.6.210.0080.03518.21
5.6.200.0070.03818.32
5.6.190.0160.02818.39
5.6.180.0110.03518.54
5.6.170.0170.03718.58
5.6.160.0150.03118.41
5.6.150.0150.04218.41
5.6.140.0060.03718.64
5.6.130.0110.03318.43
5.6.120.0130.03118.44
5.6.110.0120.03418.37
5.6.100.0120.03018.49
5.6.90.0030.04118.36
5.6.80.0080.03918.01
5.6.70.0070.03818.09
5.6.60.0110.03018.27
5.6.50.0150.03818.06
5.6.40.0100.04018.21
5.6.30.0160.03018.05
5.6.20.0030.04018.13
5.6.10.0140.03518.12
5.6.00.0100.04118.07
5.5.380.0040.01315.93
5.5.370.0090.03618.23
5.5.360.0050.03618.05
5.5.350.0130.03118.17
5.5.340.0110.03018.44
5.5.330.0030.03918.58
5.5.320.0070.03718.37
5.5.310.0130.03718.49
5.5.300.0100.03318.48
5.5.290.0100.03318.30
5.5.280.0140.03218.30
5.5.270.0060.03718.38
5.5.260.0100.03418.30
5.5.250.0070.03518.20
5.5.240.0070.03217.90
5.5.230.0120.03417.96
5.5.220.0100.03318.03
5.5.210.0100.04517.95
5.5.200.0080.04118.04
5.5.190.0120.03218.04
5.5.180.0120.03418.01
5.5.170.0080.00815.62
5.5.160.0130.03717.94
5.5.150.0070.03318.04
5.5.140.0060.03518.03
5.5.130.0080.03318.02
5.5.120.0050.03517.92
5.5.110.0080.02818.10
5.5.100.0080.03217.85
5.5.90.0120.03417.85
5.5.80.0120.03317.91
5.5.70.0030.03717.94
5.5.60.0160.02517.91
5.5.50.0030.03517.91
5.5.40.0100.03017.97
5.5.30.0130.02817.97
5.5.20.0100.04217.83
5.5.10.0080.03517.99
5.5.00.0100.03318.00

preferences:
58.21 ms | 401 KiB | 5 Q