3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container { private $a; private $b; private $c; public function __construct($a, $b, $c) { $this->a = $a; $this->b = $b; $this->c = $c; } } class Clazz { private $container; private $d; private $e; public function __construct(Container $container, $d, $e) { $this->container = $container; $this->d = $d; $this->e = $e; } } $classes = array(); for ($i = 0; $i < 50000; $i++) { $classes[] = new Clazz(new Container('a', 'b', 'c'), 'd', 'e'); }

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.0260.01928.19
8.3.50.0210.02128.11
8.3.40.0220.01929.73
8.3.30.0160.01930.34
8.3.20.0100.01031.39
8.3.10.0060.00932.23
8.3.00.0090.00632.65
8.2.180.0250.01327.38
8.2.170.0170.02029.91
8.2.160.0100.01731.11
8.2.150.0100.01029.88
8.2.140.0100.01031.35
8.2.130.0070.01331.65
8.2.120.0070.01428.63
8.2.110.0220.00630.30
8.2.100.0200.01029.04
8.2.90.0070.01629.22
8.2.80.0070.01629.05
8.2.70.0070.01628.63
8.2.60.0040.02028.93
8.2.50.0110.01428.75
8.2.40.0130.01029.45
8.2.30.0090.01529.27
8.2.20.0000.02228.74
8.2.10.0030.01928.94
8.2.00.0000.02528.79
8.1.280.0290.01028.13
8.1.270.0040.01634.07
8.1.260.0110.00831.45
8.1.250.0100.01034.18
8.1.240.0130.03034.20
8.1.230.0130.01633.04
8.1.220.0070.01729.79
8.1.210.0070.01630.80
8.1.200.0100.01729.22
8.1.190.0070.01729.53
8.1.180.0030.02030.60
8.1.170.0080.01530.59
8.1.160.0070.01533.93
8.1.150.0030.02030.45
8.1.140.0130.01029.23
8.1.130.0030.02129.72
8.1.120.0030.01729.33
8.1.110.0100.01329.26
8.1.100.0060.01529.36
8.1.90.0030.01729.32
8.1.80.0140.01029.36
8.1.70.0030.01729.28
8.1.60.0140.01429.50
8.1.50.0070.01729.37
8.1.40.0030.02129.45
8.1.30.0170.00729.60
8.1.20.0000.02529.50
8.1.10.0120.01229.36
8.1.00.0090.01629.32
8.0.300.0100.01332.15
8.0.290.0090.01229.05
8.0.280.0090.01230.17
8.0.270.0070.01528.98
8.0.260.0110.01128.65
8.0.250.0060.01628.57
8.0.240.0030.01728.65
8.0.230.0170.01028.73
8.0.220.0070.01428.64
8.0.210.0060.01528.65
8.0.200.0070.01328.63
8.0.190.0090.01528.77
8.0.180.0100.01328.61
8.0.170.0070.01828.65
8.0.160.0070.01728.70
8.0.150.0250.00628.65
8.0.140.0070.01728.57
8.0.130.0000.02225.15
8.0.120.0100.01728.63
8.0.110.0130.01028.48
8.0.100.0040.01928.51
8.0.90.0100.01328.61
8.0.80.0130.03528.68
8.0.70.0130.01628.61
8.0.60.0060.01628.59
8.0.50.0120.01228.56
8.0.30.0280.03828.84
8.0.20.0270.03928.96
8.0.10.0070.01628.73
8.0.00.0120.04428.41
7.4.330.0060.01325.46
7.4.320.0090.01328.25
7.4.300.0000.02128.35
7.4.290.0070.01728.21
7.4.280.0100.01728.08
7.4.270.0070.01628.27
7.4.260.0100.01628.19
7.4.250.0070.01828.33
7.4.240.0080.01828.23
7.4.230.0030.01928.34
7.4.220.0260.03028.12
7.4.210.0130.03528.24
7.4.200.0040.02228.29
7.4.190.0100.01328.44
7.4.160.0190.04228.16
7.4.150.0230.03028.17
7.4.140.0300.03628.19
7.4.130.0140.04228.26
7.4.120.0200.03628.41
7.4.110.0140.03828.19
7.4.100.0330.02328.38
7.4.90.0160.04228.49
7.4.80.0220.03928.01
7.4.70.0190.03628.12
7.4.60.0070.06628.35
7.4.50.0070.02328.07
7.4.40.0130.03028.21
7.4.30.0140.03928.22
7.4.00.0170.03126.53
7.3.330.0030.02025.15
7.3.320.0030.02125.15
7.3.310.0060.01927.93
7.3.300.0100.01428.07
7.3.290.0200.03628.03
7.3.280.0230.04127.99
7.3.270.0280.05528.13
7.3.260.0100.04628.25
7.3.250.0170.04228.11
7.3.240.0260.03928.20
7.3.230.0100.04328.38
7.3.210.0250.03528.22
7.3.200.0230.03228.32
7.3.190.0170.05528.20
7.3.180.0280.02828.11
7.3.170.0310.04928.03
7.3.160.0230.03628.12
7.3.120.0220.02226.60
7.2.330.0320.04828.29
7.2.320.0100.04828.21
7.2.310.0220.03228.22
7.2.300.0200.03728.43
7.2.290.0100.04528.15
7.2.00.0040.02231.55
7.1.100.0900.03127.07
7.1.70.0070.03829.43
7.1.60.0060.03529.63
7.1.50.0030.04029.48
7.1.00.0130.10034.69
7.0.200.0250.02228.79
7.0.140.0100.10034.46
7.0.60.0270.09031.75
7.0.50.0100.10729.71
7.0.40.0030.06321.51
7.0.30.0170.06721.63
7.0.20.0370.08021.72
7.0.10.0300.10021.68
7.0.00.0070.09721.70
5.6.280.0300.15758.38
5.6.210.0130.16356.36
5.6.200.0300.16053.88
5.6.190.0170.15056.17
5.6.180.0400.15757.45
5.6.170.0470.14756.07
5.6.160.0300.11056.07
5.6.150.0100.11753.79
5.6.140.0300.13053.88
5.6.130.0230.13353.95
5.6.120.0230.13356.88
5.6.110.0170.11756.75
5.6.100.0300.12356.72
5.6.90.0270.16356.82
5.6.80.0070.14356.27
5.6.70.0500.13356.13
5.5.350.0370.15356.08
5.5.340.0030.11053.65
5.5.330.0070.11755.87
5.5.320.0300.12055.75
5.5.310.0200.13055.85
5.5.300.0130.17353.67
5.5.290.0200.12753.68
5.5.280.0170.17056.70
5.5.270.0100.16356.53
5.5.260.0200.16756.71
5.5.250.0130.13356.20
5.5.240.0200.15755.89
5.4.450.0430.21755.13
5.4.440.0430.25054.87
5.4.430.0600.16355.13
5.4.420.0400.21055.22
5.4.410.0300.19755.13
5.4.400.2170.00054.46
5.4.390.2270.00054.23
5.4.380.0500.19354.29
5.4.370.0330.17054.50
5.4.360.0570.14754.32
5.4.350.0470.15354.43
5.4.340.0500.15054.20
5.4.320.0180.11548.23
5.4.310.0200.11448.22
5.4.300.0040.12748.23
5.4.290.0150.12248.22
5.4.280.0170.11948.12
5.4.270.0210.11248.13
5.4.260.0250.14148.12
5.4.250.0200.11548.12
5.4.240.0190.12048.13
5.4.230.0250.11148.11
5.4.220.0170.12548.11
5.4.210.0140.12148.11
5.4.200.0140.12748.11
5.4.190.0500.23754.33
5.4.180.0270.22354.43
5.4.170.0400.25354.57
5.4.160.0570.15754.48
5.4.150.0430.26354.54
5.4.140.0470.20352.18
5.4.130.0530.22352.02
5.4.120.0270.17352.15
5.4.110.0370.23052.16
5.4.100.0530.24052.08
5.4.90.0300.18052.11
5.4.80.0500.26352.11
5.4.70.0230.28752.11
5.4.60.0570.25352.05
5.4.50.0300.20052.09
5.4.40.0130.18352.08
5.4.30.0630.21352.22
5.4.20.0470.23352.15
5.4.10.0270.18752.23
5.4.00.0170.29351.49
5.3.290.0210.16172.70
5.3.280.0240.16072.63
5.3.270.0700.30774.37
5.3.260.0330.30074.51
5.3.250.0470.26774.59
5.3.240.0500.32774.41
5.3.230.0670.30074.51
5.3.220.0570.23374.39
5.3.210.0370.28374.39
5.3.200.0470.22074.52
5.3.190.0530.29774.39
5.3.180.0670.32074.52
5.3.170.0470.32074.43
5.3.160.0630.31074.30
5.3.150.0530.23074.47
5.3.140.0570.25374.29
5.3.130.0470.25074.50
5.3.120.0570.31074.43
5.3.110.0570.32074.54
5.3.100.0500.30073.96
5.3.90.0430.34773.75
5.3.80.0600.25373.86
5.3.70.0470.26773.90
5.3.60.0630.32374.28
5.3.50.0400.30773.88
5.3.40.0430.22773.77
5.3.30.0570.37073.65
5.3.20.0600.28373.54
5.3.10.0700.28773.58
5.3.00.0470.38073.39
5.2.170.0700.25072.27
5.2.160.0330.28072.30
5.2.150.0470.27772.34
5.2.140.0400.28072.27
5.2.130.0330.31072.33
5.2.120.0770.32372.13
5.2.110.0530.32372.15
5.2.100.0670.28073.03
5.2.90.0330.30772.08
5.2.80.0170.23772.22
5.2.70.0270.22772.21
5.2.60.0370.23072.04
5.2.50.0300.35072.40
5.2.40.0300.31372.59
5.2.30.0430.24771.97
5.2.20.0430.26772.25
5.2.10.0400.29071.80
5.2.00.0500.25089.61
5.1.60.0570.317113.84
5.1.50.0730.283113.72
5.1.40.0570.323113.86
5.1.30.0770.377114.23
5.1.20.0400.367114.20
5.1.10.0670.270113.93
5.1.00.0700.297114.07
5.0.50.0770.467112.60
5.0.40.0770.413112.13
5.0.30.0770.353112.16
5.0.20.0400.377112.05
5.0.10.0600.400112.21
5.0.00.0700.347112.23
4.4.90.0000.0237.23
4.4.80.0000.0237.23
4.4.70.0030.0207.23
4.4.60.0070.0177.23
4.4.50.0070.0277.23
4.4.40.0030.0377.23
4.4.30.0070.0277.23
4.4.20.0000.0237.23
4.4.10.0100.0237.23
4.4.00.0130.0277.23
4.3.110.0000.0237.23
4.3.100.0070.0177.23
4.3.90.0000.0237.23
4.3.80.0030.0437.23
4.3.70.0030.0207.23
4.3.60.0030.0277.23
4.3.50.0000.0307.23
4.3.40.0030.0337.23
4.3.30.0030.0307.23
4.3.20.0070.0277.23
4.3.10.0030.0277.23
4.3.00.0000.0306.83

preferences:
37.97 ms | 401 KiB | 5 Q