3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SelectUserById { private $container; public function __construct($container) { $this->container = $container; } public function vai() { echo $this->container; } } abstract class QueryFactory { public function __invoke($container) { $class = static::QUERY_NAMESPACE; return new $class($container); } } final class SelectUserByIdFactory extends QueryFactory { const QUERY_NAMESPACE = SelectUserById::class; } $instance = (new SelectUserByIdFactory)('container here'); $instance->vai();

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.0120.00918.18
8.3.50.0060.00916.71
8.3.40.0070.00718.79
8.3.30.0040.01118.89
8.3.20.0040.00418.95
8.3.10.0050.00223.68
8.3.00.0080.00317.75
8.2.180.0060.01318.16
8.2.170.0070.00722.96
8.2.160.0100.00318.94
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00719.30
8.2.120.0080.00026.35
8.2.110.0000.00920.35
8.2.100.0040.00817.91
8.2.90.0030.00617.63
8.2.80.0040.00418.05
8.2.70.0080.00017.93
8.2.60.0000.00817.96
8.2.50.0090.00018.10
8.2.40.0040.00419.34
8.2.30.0000.00719.07
8.2.20.0000.00818.13
8.2.10.0080.00017.97
8.2.00.0000.00718.25
8.1.280.0100.00725.92
8.1.270.0040.00419.83
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00622.42
8.1.230.0130.00018.92
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0080.00417.36
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0000.00818.49
8.1.160.0000.00718.77
8.1.150.0050.00318.77
8.1.140.0000.00719.13
8.1.130.0040.00418.91
8.1.120.0070.00017.48
8.1.110.0000.00717.52
8.1.100.0070.00317.45
8.1.90.0030.00417.53
8.1.80.0040.00417.43
8.1.70.0000.00717.32
8.1.60.0040.00417.62
8.1.50.0000.01217.43
8.1.40.0040.00417.48
8.1.30.0080.00017.55
8.1.20.0040.00417.64
8.1.10.0040.00417.59
8.1.00.0040.00417.48
8.0.300.0000.00719.73
8.0.290.0020.00516.75
8.0.280.0000.00818.40
8.0.270.0030.00317.25
8.0.260.0050.00317.33
8.0.250.0030.00316.94
8.0.240.0030.00616.91
8.0.230.0000.00816.87
8.0.220.0040.00416.89
8.0.210.0050.00316.80
8.0.200.0030.00316.92
8.0.190.0000.00716.83
8.0.180.0040.00416.83
8.0.170.0080.00016.82
8.0.160.0060.00316.89
8.0.150.0000.00716.80
8.0.140.0000.00716.90
8.0.130.0030.00313.20
8.0.120.0000.00816.90
8.0.110.0000.00816.77
8.0.100.0000.00716.91
8.0.90.0020.00516.96
8.0.80.0100.00616.88
8.0.70.0040.00417.01
8.0.60.0040.00416.78
8.0.50.0060.00316.80
8.0.30.0080.01617.04
8.0.20.0100.01117.40
8.0.10.0040.00416.92
8.0.00.0170.00616.90
7.4.330.0050.00016.84
7.4.320.0030.00316.43
7.4.300.0000.00716.58
7.4.290.0070.00016.42
7.4.280.0000.00816.50
7.4.270.0070.00016.55
7.4.260.0070.00016.56
7.4.250.0000.00716.49
7.4.240.0000.00716.63
7.4.230.0000.00816.49
7.4.220.0040.00416.63
7.4.210.0100.01016.55
7.4.200.0030.00316.52
7.4.160.0100.01116.61
7.4.150.0070.01117.40
7.4.140.0100.01217.86
7.4.130.0160.00916.42
7.4.120.0130.00716.49
7.4.110.0130.00316.34
7.4.100.0100.00716.68
7.4.90.0130.00416.44
7.4.80.0080.01119.39
7.4.70.0100.00716.50
7.4.60.0040.01516.52
7.4.50.0000.01416.50
7.4.40.0070.01016.57
7.4.10.0110.00715.09
7.4.00.0080.00814.94
7.3.330.0030.00313.36
7.3.320.0030.00313.31
7.3.310.0000.00716.31
7.3.300.0000.00716.41
7.3.290.0070.00816.36
7.3.280.0050.01216.38
7.3.270.0070.01117.40
7.3.260.0090.00816.49
7.3.250.0140.00816.50
7.3.240.0090.01016.41
7.3.230.0090.00916.51
7.3.210.0100.00716.47
7.3.200.0090.01316.61
7.3.190.0100.00716.42
7.3.180.0080.00816.35
7.3.170.0350.01816.37
7.3.160.0030.01716.43
7.3.130.0130.00714.75
7.3.120.0080.00814.79
7.3.110.0060.01214.75
7.3.100.0080.00814.83
7.3.90.0030.01214.70
7.3.80.0080.00514.81
7.3.70.0060.01114.80
7.3.60.0080.00914.79
7.3.50.0080.00614.72
7.3.40.0060.00814.72
7.3.30.0050.00914.93
7.3.20.0060.00516.84
7.3.10.0090.00516.52
7.3.00.0030.01016.69
7.2.330.0070.01016.74
7.2.320.0060.01116.83
7.2.310.0130.00316.65
7.2.300.0150.00916.41
7.2.290.0160.00016.73
7.2.260.0090.00915.23
7.2.250.0040.01415.07
7.2.240.0050.01215.02
7.2.230.0050.00815.13
7.2.220.0090.00615.14
7.2.210.0030.01415.01
7.2.200.0090.00715.01
7.2.190.0050.00715.20
7.2.180.0050.00915.11
7.2.170.0050.00515.12
7.2.160.0100.00315.13
7.2.150.0090.00916.88
7.2.140.0060.01016.71
7.2.130.0090.00617.10
7.2.120.0060.00616.96
7.2.110.0060.00317.09
7.2.100.0090.00617.09
7.2.90.0060.00317.00
7.2.80.0040.00817.19
7.2.70.0080.00416.89
7.2.60.0050.01017.08
7.2.50.0090.00316.96
7.2.40.0090.00617.00
7.2.30.0100.00316.93
7.2.20.0030.01017.07
7.2.10.0210.00617.38
7.2.00.0140.01117.51
7.1.330.0020.01415.85
7.1.320.0030.00915.82
7.1.310.0070.00915.76
7.1.300.0020.00915.64
7.1.290.0080.00815.85
7.1.280.0030.01115.56
7.1.270.0100.00315.64
7.1.260.0030.01215.78
7.1.250.0040.00715.63
7.1.240.0030.00915.85
7.1.230.0100.00015.83
7.1.220.0040.01115.82
7.1.210.0000.01015.75
7.1.200.0060.00615.60
7.1.190.0000.01115.96
7.1.180.0070.00715.72
7.1.170.0070.00715.78
7.1.160.0110.00415.66
7.1.150.0130.00015.97
7.1.140.0100.00315.80
7.1.130.0160.00716.42
7.1.120.0120.01116.31
7.1.110.0180.00815.77
7.1.100.0160.00516.01
7.1.90.0200.01215.88
7.1.80.0200.01315.96
7.1.70.0220.00815.58
7.1.60.0240.00824.46
7.1.50.0290.00724.23
7.1.40.0250.01223.91
7.1.30.0230.01124.13
7.1.20.0310.00924.27
7.1.10.0220.01015.23
7.1.00.0190.01015.23
7.0.330.0090.00315.23
7.0.320.0000.01515.09
7.0.310.0040.00415.48
7.0.300.0040.01115.63
7.0.290.0000.01215.24
7.0.280.0030.00915.48
7.0.270.0000.01215.20
7.0.260.0030.00615.43
7.0.250.0000.01315.22
7.0.240.0040.00715.17
7.0.230.0090.00615.48
7.0.220.0120.00315.64
7.0.210.0070.00315.51
7.0.200.0160.00015.48
7.0.190.0060.00915.20
7.0.180.0070.00715.54
7.0.170.0090.00615.45
7.0.160.0000.01415.28
7.0.150.0070.00715.50
7.0.140.0120.00315.45
7.0.130.0030.00815.29
7.0.120.0030.00815.41
7.0.110.0040.00715.21
7.0.100.0060.00915.47
7.0.90.0060.00815.42
7.0.80.0050.00515.42
7.0.70.0000.01115.18
7.0.60.0000.01115.52
7.0.50.0060.00615.57
7.0.40.0030.00913.46
7.0.30.0050.00513.48
7.0.20.0070.00713.49
7.0.10.0040.00813.53
7.0.00.0100.00313.53
5.6.400.0070.00414.28
5.6.390.0070.00714.17
5.6.380.0030.01013.82
5.6.370.0000.01014.18
5.6.360.0030.00714.36
5.6.350.0030.01314.00
5.6.340.0060.00814.29
5.6.330.0030.00914.30
5.6.320.0080.00414.12
5.6.310.0080.00313.95
5.6.300.0100.00713.85
5.6.290.0120.00314.25
5.6.280.0000.01414.15
5.6.270.0000.01514.12
5.6.260.0030.01214.11
5.6.250.0090.00614.41
5.6.240.0070.01014.11
5.6.230.0000.00914.21
5.6.220.0000.01314.20
5.6.210.0040.00914.13
5.6.200.0040.00414.03
5.6.190.0090.00914.00
5.6.180.0000.01413.93
5.6.170.0060.00614.20
5.6.160.0000.01014.39
5.6.150.0040.01114.27
5.6.140.0060.00614.03
5.6.130.0030.01014.30
5.6.120.0100.00713.93
5.6.110.0130.00314.07
5.6.100.0000.01614.10
5.6.90.0030.01014.15
5.6.80.0040.00414.10
5.6.70.0000.01314.08
5.6.60.0060.00614.10
5.6.50.0100.00314.03
5.6.40.0030.00914.12
5.6.30.0060.00914.07
5.6.20.0090.00614.02
5.6.10.0080.00414.21
5.6.00.0040.00714.08

preferences:
60.99 ms | 401 KiB | 5 Q