3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject\ClassB; class B { public $something; public function __construct() { $this->something = "Some (dynamic) string value"; } public function getStr() { echo $this->something; } } namespace MyProject\ClassA; use \MyProject\ClassB\B as B; class A { private $privateVariable; public function __construct() { $b = new B(); $this->privateVariable = $b->something; $b->getStr(); } } namespace MyProject\Something; use \MyProject\ClassA\A as A; $a = new A();

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.5.10.0080.00919.92
8.5.00.0180.00319.90
8.4.160.0110.01023.87
8.4.150.0020.00014.05
8.4.140.0130.00917.68
8.4.130.0110.00917.57
8.4.120.0050.00420.77
8.4.110.0100.00822.50
8.4.100.0140.00817.86
8.4.90.0020.00717.84
8.4.80.0100.00717.64
8.4.70.0060.00217.79
8.4.60.0060.01518.82
8.4.50.0040.00519.39
8.4.40.0030.00624.03
8.4.30.0090.00922.27
8.4.20.0100.01017.41
8.4.10.0100.01019.43
8.3.290.0130.00822.40
8.3.280.0090.01118.24
8.3.270.0120.00816.61
8.3.260.0090.00916.71
8.3.250.0120.00618.73
8.3.240.0050.00316.44
8.3.230.0140.00616.66
8.3.220.0050.00317.13
8.3.210.0150.00916.64
8.3.200.0100.00816.44
8.3.190.0100.00916.99
8.3.180.0020.00516.60
8.3.170.0120.00619.11
8.3.160.0120.00620.27
8.3.150.0060.01017.13
8.3.140.0120.00318.99
8.3.130.0130.00616.47
8.3.120.0120.00818.90
8.3.110.0060.00320.94
8.3.100.0090.00024.06
8.3.90.0040.01426.77
8.3.80.0060.00316.75
8.3.70.0210.00016.58
8.3.60.0090.00618.55
8.3.50.0130.00922.83
8.3.40.0120.00318.73
8.3.30.0210.00018.64
8.3.20.0080.00020.16
8.3.10.0040.00421.73
8.3.00.0040.00419.91
8.2.300.0120.00918.78
8.2.290.0130.00520.27
8.2.280.0070.00420.15
8.2.270.0120.00317.32
8.2.260.0040.00416.62
8.2.250.0110.00418.61
8.2.240.0060.00316.97
8.2.230.0070.00422.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0000.00916.63
8.2.190.0110.00316.58
8.2.180.0070.00725.92
8.2.170.0140.00318.82
8.2.160.0130.00322.96
8.2.150.0000.00825.66
8.2.140.0030.00624.66
8.2.130.0000.00820.98
8.2.120.0000.00726.16
8.2.110.0030.00622.25
8.2.100.0040.00817.72
8.2.90.0080.00019.21
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0040.00417.68
8.2.50.0040.00418.10
8.2.40.0000.00720.64
8.2.30.0000.00719.31
8.2.20.0070.00017.67
8.2.10.0000.00817.91
8.2.00.0040.00418.04
8.1.340.0120.00821.60
8.1.330.0100.00816.54
8.1.320.0070.00316.18
8.1.310.0060.00318.39
8.1.300.0090.00016.28
8.1.290.0080.00418.88
8.1.280.0130.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00623.93
8.1.230.0040.00819.22
8.1.220.0050.00317.79
8.1.210.0060.00318.77
8.1.200.0070.00317.35
8.1.190.0090.00017.13
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0050.00222.05
8.1.150.0040.00418.76
8.1.140.0040.00419.48
8.1.130.0030.00517.59
8.1.120.0000.00717.40
8.1.110.0040.00417.34
8.1.100.0050.00317.30
8.1.90.0040.00417.29
8.1.80.0000.00817.40
8.1.70.0000.00717.40
8.1.60.0040.00417.48
8.1.50.0000.00917.49
8.1.40.0070.00717.39
8.1.30.0030.00517.68
8.1.20.0070.00017.68
8.1.10.0050.00217.62
8.1.00.0040.00417.40
8.0.300.0000.00819.93
8.0.290.0040.00416.63
8.0.280.0040.00418.44
8.0.270.0030.00317.28
8.0.260.0080.00017.16
8.0.250.0040.00417.01
8.0.240.0030.00616.93
8.0.230.0040.00416.90
8.0.220.0000.00716.83
8.0.210.0040.00416.81
8.0.200.0030.00316.78
8.0.190.0000.00716.78
8.0.180.0000.00816.86
8.0.170.0070.00016.88
8.0.160.0000.00716.79
8.0.150.0020.00516.87
8.0.140.0030.00616.79
8.0.130.0000.00513.29
8.0.120.0000.00816.79
8.0.110.0000.00716.74
8.0.100.0040.00416.87
8.0.90.0050.00216.80
8.0.80.0050.01016.87
8.0.70.0040.00416.86
8.0.60.0040.00416.61
8.0.50.0050.00216.85
8.0.30.0110.00817.05
8.0.20.0070.01117.40
8.0.10.0030.00316.83
8.0.00.0100.00716.65
7.4.330.0050.00015.08
7.4.320.0040.00416.52
7.4.300.0060.00016.52
7.4.290.0030.00616.41
7.4.280.0040.00416.61
7.4.270.0030.00516.64
7.4.260.0080.00016.50
7.4.250.0000.00816.41
7.4.240.0030.00316.61
7.4.230.0030.00316.50
7.4.220.0080.01216.48
7.4.210.0090.00616.68
7.4.200.0000.00716.53
7.4.160.0040.01116.64
7.4.150.0100.00717.40
7.4.140.0100.00917.86
7.4.130.0100.00716.56
7.4.120.0060.01116.48
7.4.110.0060.00916.52
7.4.100.0140.00316.54
7.4.90.0120.00616.52
7.4.80.0100.00719.39
7.4.70.0070.01016.48
7.4.60.0120.01116.47
7.4.50.0080.00616.46
7.4.40.0100.00716.63
7.4.30.0060.00916.38
7.4.10.0070.01114.92
7.4.00.0090.00415.07
7.3.330.0050.00013.16
7.3.320.0030.00313.25
7.3.310.0000.00716.33
7.3.300.0030.00316.27
7.3.290.0070.00716.29
7.3.280.0080.01016.30
7.3.270.0090.00617.40
7.3.260.0090.00816.54
7.3.250.0070.01116.31
7.3.240.0130.00716.27
7.3.230.0120.00416.39
7.3.210.0060.01216.32
7.3.200.0130.00716.59
7.3.190.0070.01016.61
7.3.180.0090.00916.49
7.3.170.0100.00916.61
7.3.160.0090.00916.56
7.3.130.0070.01014.93
7.3.120.0070.00814.83
7.3.110.0130.00615.03
7.3.100.0070.00614.80
7.3.90.0080.00614.86
7.3.80.0050.00714.92
7.3.70.0060.00614.81
7.3.60.0020.01314.71
7.3.50.0110.00314.77
7.3.40.0060.00814.85
7.3.30.0060.00614.73
7.3.20.0070.00616.63
7.3.10.0050.00716.50
7.3.00.0080.00616.44
7.2.330.0060.01116.81
7.2.320.0100.00716.80
7.2.310.0090.01516.75
7.2.300.0060.01016.71
7.2.290.0070.01016.50
7.2.260.0090.00915.28
7.2.250.0050.01415.15
7.2.240.0070.01014.98
7.2.230.0030.01214.80
7.2.220.0070.00714.91
7.2.210.0100.00514.89
7.2.200.0050.00815.10
7.2.190.0040.00715.02
7.2.180.0000.01215.07
7.2.170.0040.00715.15
7.2.160.0030.00915.02
7.2.150.0100.00617.06
7.2.140.0040.00816.93
7.2.130.0060.00816.80
7.2.120.0080.00616.90
7.2.110.0040.00916.69
7.2.100.0040.01116.83
7.2.90.0060.00416.86
7.2.80.0070.00716.95
7.2.70.0060.00917.07
7.2.60.0030.00916.86
7.2.50.0050.00917.12
7.2.40.0080.00616.99
7.2.30.0040.01017.00
7.2.20.0060.00816.73
7.2.10.0070.01017.09
7.2.00.0040.01017.77
7.1.330.0030.01115.85
7.1.320.0030.00915.67
7.1.310.0050.00715.63
7.1.300.0080.01115.80
7.1.290.0060.00615.76
7.1.280.0040.00515.73
7.1.270.0090.00515.71
7.1.260.0090.00415.57
7.1.250.0070.00715.67
7.1.240.0060.00915.83
7.1.230.0000.01615.82
7.1.220.0120.00015.94
7.1.210.0070.00415.70
7.1.200.0050.00915.82
7.1.190.0070.00715.47
7.1.180.0130.00015.80
7.1.170.0040.00715.64
7.1.160.0000.01715.91
7.1.150.0030.00915.91
7.1.140.0030.01015.75
7.1.130.0090.00915.46
7.1.120.0140.00315.52
7.1.110.0060.00915.61
7.1.100.0040.01215.63
7.1.90.0030.01015.57
7.1.80.0130.00315.75
7.1.70.0060.00616.52
7.1.60.0060.00817.59
7.1.50.0100.00615.80
7.1.40.0110.00315.78
7.1.30.0100.00315.74
7.1.20.0030.01215.64
7.1.10.0030.01315.57
7.1.00.0050.03819.15
7.0.330.0040.01115.38
7.0.320.0030.00615.48
7.0.310.0070.00715.48
7.0.300.0000.01515.18
7.0.290.0090.00915.41
7.0.280.0030.00915.50
7.0.270.0060.01215.51
7.0.260.0000.01715.36
7.0.250.0070.00715.50
7.0.240.0000.00815.37
7.0.230.0080.00815.41
7.0.220.0120.00615.58
7.0.210.0030.00715.46
7.0.200.0050.00816.10
7.0.190.0040.00815.54
7.0.180.0030.00715.46
7.0.170.0030.01015.42
7.0.160.0030.00615.37
7.0.150.0070.01015.50
7.0.140.0030.00915.59
7.0.130.0070.00715.20
7.0.120.0040.00815.33
7.0.110.0070.00315.32
7.0.100.0070.00715.36
7.0.90.0110.00315.45
7.0.80.0120.03517.68
7.0.70.0130.03117.66
7.0.60.0230.02617.71
7.0.50.0130.03617.98
7.0.40.0150.03416.95
7.0.30.0150.03416.90
7.0.20.0150.03516.91
7.0.10.0180.03116.86
7.0.00.0180.03316.92
5.6.400.0120.00314.63
5.6.390.0000.00914.56
5.6.380.0060.00914.19
5.6.370.0090.00614.09
5.6.360.0090.00614.34
5.6.350.0060.00914.41
5.6.340.0030.01014.32
5.6.330.0060.01214.41
5.6.320.0030.01114.54
5.6.310.0080.00814.35
5.6.300.0120.00314.53
5.6.290.0070.00714.69
5.6.280.0070.00714.46
5.6.270.0030.00614.50
5.6.260.0030.01014.64
5.6.250.0000.01514.24
5.6.240.0000.00914.07
5.6.230.0080.03617.44
5.6.220.0180.02817.62
5.6.210.0050.03717.43
5.6.200.0120.03317.67
5.6.190.0070.03717.71
5.6.180.0140.03017.71
5.6.170.0100.03217.86
5.6.160.0130.02817.61
5.6.150.0120.03017.64
5.6.140.0070.03517.63
5.6.130.0070.04017.75
5.6.120.0120.03217.75
5.6.110.0130.03117.85
5.6.100.0100.03017.77
5.6.90.0120.03417.92
5.6.80.0090.03117.40
5.6.70.0130.02817.39
5.6.60.0050.03417.48
5.6.50.0120.02817.47
5.6.40.0070.03217.36
5.6.30.0130.02817.26
5.6.20.0060.03317.46
5.6.10.0050.03217.38
5.6.00.0060.03317.36
5.5.380.0030.00714.48
5.5.370.0030.01014.39
5.5.360.0070.00414.25
5.5.350.0100.00614.68
5.5.340.0090.00314.55
5.5.330.0030.01014.51
5.5.320.0030.01014.28
5.5.310.0120.00314.65
5.5.300.0060.00614.50
5.5.290.0080.00414.23
5.5.280.0040.01214.12
5.5.270.0060.00913.89
5.5.260.0090.00014.29
5.5.250.0000.01314.22
5.5.240.0030.00614.42
5.5.230.0000.01114.09
5.5.220.0090.00314.39
5.5.210.0070.00714.17
5.5.200.0070.00714.37
5.5.190.0070.00314.36
5.5.180.0040.00414.27
5.5.170.0110.00014.12
5.5.160.0070.00413.79
5.5.150.0030.01214.47
5.5.140.0060.00614.50
5.5.130.0000.00914.16
5.5.120.0070.00714.24
5.5.110.0090.00014.16
5.5.100.0070.00313.87
5.5.90.0090.00314.23
5.5.80.0040.00814.22
5.5.70.0060.00913.91
5.5.60.0100.00314.55
5.5.50.0060.00914.09
5.5.40.0080.00014.13
5.5.30.0060.00314.20
5.5.20.0080.00314.37
5.5.10.0070.00314.08
5.5.00.0060.00614.37

preferences:
34.88 ms | 403 KiB | 5 Q