3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Project\Model\Entity; /** * Class EntityFactory * * A factory to DI around to build entities * * @package Project\Model\Entity */ class EntityFactory { /** * Create your entity * * @param string $entityName This should be the concrete name of the entity, like 'User' or 'Test' * @param array $args Single dimensional array of required entity arguments * * @return object The entity - you will have to typehint the object in your code for IDE auto-completion */ public function buildEntity($entityName, array $args = []) { if (!class_exists($className = sprintf('%s\%s', __NAMESPACE__, $entityName))) { throw new \InvalidArgumentException(sprintf( 'Invalid entity name provided, got: %s', $entityName )); } $reflector = new \ReflectionClass($className); return $reflector->newInstanceArgs($args); } }

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.0040.01418.18
8.3.50.0080.01022.87
8.3.40.0040.01118.71
8.3.30.0100.00718.96
8.3.20.0040.00420.39
8.3.10.0070.00021.71
8.3.00.0040.00419.56
8.2.180.0150.00616.32
8.2.170.0100.00622.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0000.00826.16
8.2.120.0080.00019.23
8.2.110.0070.00319.03
8.2.100.0070.00717.66
8.2.90.0080.00019.14
8.2.80.0030.00519.45
8.2.70.0080.00017.34
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0000.00817.90
8.2.30.0000.00819.45
8.2.20.0050.00317.65
8.2.10.0080.00017.94
8.2.00.0040.00417.63
8.1.280.0160.00325.92
8.1.270.0100.00022.06
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00624.01
8.1.230.0060.00621.03
8.1.220.0030.00518.77
8.1.210.0020.01019.08
8.1.200.0030.00617.23
8.1.190.0080.00017.29
8.1.180.0080.00018.10
8.1.170.0040.00418.62
8.1.160.0000.00718.73
8.1.150.0040.00418.76
8.1.140.0000.00717.34
8.1.130.0070.00017.65
8.1.120.0050.00217.40
8.1.110.0000.00717.25
8.1.100.0030.00317.33
8.1.90.0040.00417.35
8.1.80.0070.00017.39
8.1.70.0070.00017.20
8.1.60.0000.00817.54
8.1.50.0030.00517.43
8.1.40.0070.00017.41
8.1.30.0030.00517.52
8.1.20.0050.00317.43
8.1.10.0040.00417.41
8.1.00.0040.00417.34
8.0.300.0070.00019.81
8.0.290.0040.00417.05
8.0.280.0040.00418.34
8.0.270.0070.00017.06
8.0.260.0030.00317.23
8.0.250.0040.00416.86
8.0.240.0000.00616.83
8.0.230.0000.00716.84
8.0.220.0000.00716.68
8.0.210.0000.00716.76
8.0.200.0000.00716.82
8.0.190.0000.00816.79
8.0.180.0040.00416.81
8.0.170.0000.00716.77
8.0.160.0030.00316.77
8.0.150.0040.00416.82
8.0.140.0040.00416.74
8.0.130.0000.00613.27
8.0.120.0040.00416.67
8.0.110.0000.00716.77
8.0.100.0040.00416.65
8.0.90.0040.00416.75
8.0.80.0110.00316.68
8.0.70.0000.00816.68
8.0.60.0000.00716.72
8.0.50.0030.00516.65
8.0.30.0110.00817.08
8.0.20.0060.01217.40
8.0.10.0000.00816.89
8.0.00.0050.01216.55
7.4.330.0000.00615.02
7.4.320.0030.00316.41
7.4.300.0060.00016.43
7.4.290.0040.00416.39
7.4.280.0040.00416.38
7.4.270.0070.00016.30
7.4.260.0030.00316.43
7.4.250.0070.00016.26
7.4.240.0050.00216.36
7.4.230.0040.00416.49
7.4.220.0060.01116.46
7.4.210.0000.01416.55
7.4.200.0030.00316.38
7.4.160.0030.01316.45
7.4.150.0120.01017.40
7.4.140.0120.00917.86
7.4.130.0060.01316.31
7.4.120.0110.01016.46
7.4.110.0090.01216.30
7.4.100.0140.00716.27
7.4.90.0040.01316.45
7.4.80.0150.00319.39
7.4.70.0080.00916.26
7.4.60.0030.01716.41
7.4.50.0000.00816.55
7.4.40.0110.00516.49
7.4.30.0130.00616.21
7.4.00.0030.01014.82
7.3.330.0060.00013.05
7.3.320.0000.00513.20
7.3.310.0030.00316.29
7.3.300.0030.00316.11
7.3.290.0060.01416.17
7.3.280.0070.01116.18
7.3.270.0100.00617.40
7.3.260.0150.00316.14
7.3.250.0060.01116.13
7.3.240.0180.00016.29
7.3.230.0070.00816.41
7.3.210.0140.00316.38
7.3.200.0110.01519.39
7.3.190.0030.01416.45
7.3.180.0120.00316.22
7.3.170.0060.00916.31
7.3.160.0090.00616.39
7.3.10.0000.01416.53
7.3.00.0120.00316.18
7.2.330.0100.00716.47
7.2.320.0060.01116.37
7.2.310.0040.01516.57
7.2.300.0130.00316.36
7.2.290.0070.01016.47
7.2.130.0000.01616.61
7.2.120.0100.00716.53
7.2.110.0090.00916.83
7.2.100.0080.00416.29
7.2.90.0000.01816.82
7.2.80.0060.00916.71
7.2.70.0030.01216.88
7.2.60.0070.00816.71
7.2.50.0070.01016.70
7.2.40.0030.01016.69
7.2.30.0120.00316.64
7.2.20.0090.00616.69
7.2.10.0090.00316.68
7.2.00.0050.00817.91
7.1.250.0000.00815.18
7.1.200.0140.00015.52
7.1.100.0070.00717.91
7.1.70.0040.00417.05
7.1.60.0130.01019.34
7.1.50.0030.01716.84
7.1.00.0030.07722.46
7.0.200.0000.01016.74
7.0.140.0000.07722.09
7.0.60.0000.04319.84
7.0.50.0030.04317.90
7.0.40.0030.05320.30
7.0.30.0300.07320.09
7.0.20.0230.08020.24
7.0.10.0230.06720.20
7.0.00.0130.07020.14
5.6.280.0000.07720.79
5.6.210.0100.08020.54
5.6.200.0100.08318.19
5.6.190.0200.08020.50
5.6.180.0370.06320.44
5.6.170.0530.05720.54
5.6.160.0130.07720.47
5.6.150.0030.05718.18
5.6.140.0100.07318.23
5.6.130.0100.04018.16
5.6.120.0070.09321.14
5.6.110.0030.05721.12
5.6.100.0030.08321.14
5.6.90.0100.08320.96
5.6.80.0030.04320.43
5.6.70.0200.06320.37
5.5.350.0170.07720.41
5.5.340.0030.08717.98
5.5.330.0070.08320.57
5.5.320.0270.08020.44
5.5.310.0170.07020.50
5.5.300.0200.07017.99
5.5.290.0070.06717.96
5.5.280.0130.07720.89
5.5.270.0030.05320.73
5.5.260.0100.08020.75
5.5.250.0100.07320.70
5.5.240.0030.03720.12
5.4.450.0230.03719.64
5.4.440.0230.05319.30
5.4.430.0270.03719.63
5.4.420.0070.05719.36
5.4.410.0130.05718.81
5.4.400.0230.06018.84
5.4.390.0070.06718.84
5.4.380.0200.06318.81
5.4.370.0170.05018.70
5.4.360.0130.04718.76
5.4.350.0130.03013.71
5.4.340.0100.03713.68
5.4.320.0070.04314.32
5.4.310.0100.04014.21
5.4.300.0070.03714.21
5.4.290.0170.03314.33
5.4.280.0200.02714.08
5.4.270.0100.04014.15
5.4.260.0100.04014.29
5.4.250.0100.04014.15
5.4.240.0070.04714.22
5.4.230.0100.04314.07
5.4.220.0030.04714.04
5.4.210.0030.04014.14
5.4.200.0100.03714.10
5.4.190.0100.03714.16
5.4.180.0130.03714.07
5.4.170.0100.04014.34
5.4.160.0100.04014.32
5.4.150.0170.03014.10
5.4.140.0170.03313.80
5.4.130.0070.03713.76
5.4.120.0070.03713.63
5.4.110.0000.05713.61
5.4.100.0030.03713.77
5.4.90.0070.03713.84
5.4.80.0030.04013.72
5.4.70.0030.04013.66
5.4.60.0000.04013.91
5.4.50.0100.03713.72
5.4.40.0000.04013.69
5.4.30.0030.04313.66
5.4.20.0070.03313.66
5.4.10.0030.03713.71
5.4.00.0130.03013.29
5.3.290.0100.03714.56
5.3.280.0000.04314.53
5.3.270.0100.03714.63
5.3.260.0070.03714.51
5.3.250.0100.03314.58
5.3.240.0100.03314.63
5.3.230.0000.04314.71
5.3.220.0100.03714.60
5.3.210.0130.03314.71
5.3.200.0100.03314.58
5.3.190.0070.03714.54
5.3.180.0070.03714.59
5.3.170.0070.03714.60
5.3.160.0070.03714.66
5.3.150.0100.03314.49
5.3.140.0070.03714.67
5.3.130.0070.04014.42
5.3.120.0170.02714.66
5.3.110.0070.04014.44
5.3.100.0070.03714.01
5.3.90.0030.04314.15
5.3.80.0100.03314.11
5.3.70.0100.04013.98
5.3.60.0070.03714.04
5.3.50.0030.04013.99
5.3.40.0070.04014.08
5.3.30.0000.04313.89
5.3.20.0030.04013.75
5.3.10.0030.04013.62
5.3.00.0100.03313.73
5.2.170.0030.03311.14
5.2.160.0030.03010.97
5.2.150.0030.03011.13
5.2.140.0030.03011.09
5.2.130.0000.04010.91
5.2.120.0000.03310.90
5.2.110.0100.02311.09
5.2.100.0030.03011.00
5.2.90.0000.03311.16
5.2.80.0070.02711.08
5.2.70.0070.03011.00
5.2.60.0070.03011.04
5.2.50.0070.03010.83
5.2.40.0000.03311.00
5.2.30.0030.03010.91
5.2.20.0030.03011.01
5.2.10.0070.02710.82
5.2.00.0070.02710.62
5.1.60.0030.0239.89
5.1.50.0000.0279.99
5.1.40.0000.0279.92
5.1.30.0030.02710.36
5.1.20.0000.03010.41
5.1.10.0000.03010.01
5.1.00.0000.03310.05
5.0.50.0100.0138.53
5.0.40.0000.0208.21
5.0.30.0030.0308.13
5.0.20.0130.0108.31
5.0.10.0000.0238.08
5.0.00.0070.0278.07
4.4.90.0000.0175.93
4.4.80.0030.0135.81
4.4.70.0000.0175.84
4.4.60.0030.0235.88
4.4.50.0000.0235.77
4.4.40.0030.0235.87
4.4.30.0000.0175.87
4.4.20.0030.0135.73
4.4.10.0030.0135.89
4.4.00.0030.0235.86
4.3.110.0000.0175.73
4.3.100.0000.0175.77
4.3.90.0030.0135.82
4.3.80.0130.0135.80
4.3.70.0000.0175.90
4.3.60.0000.0175.82
4.3.50.0000.0175.70
4.3.40.0030.0275.68
4.3.30.0000.0174.49
4.3.20.0030.0204.59
4.3.10.0000.0174.60
4.3.00.0030.02016.49

preferences:
49.55 ms | 401 KiB | 5 Q