3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); interface Hydrator { public function hydrate($incoming, $model) : string; } interface ContextualHydratorExtension extends Hydrator { public function hydrate($incoming, $model, $context = null) : string; } interface ContextualHydrator { public function hydrateWithContext($incoming, $model, $context = null) : string; } class PlsContextHydrator implements Hydrator, ContextualHydratorExtension, ContextualHydrator { public function hydrate($incoming, $model, $context = null) : string { return sprintf("%s('%s')", __METHOD__, implode(', ', func_get_args())); } public function hydrateWithContext($incoming, $model, $context = null) : string { return $this->hydrate($incoming, $model, $context); } } $hydrator = new PlsContextHydrator(); var_dump( $hydrator->hydrate('nah', 'maybes', 'whatever') );

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.01418.30
8.3.50.0120.01021.02
8.3.40.0090.00618.60
8.3.30.0070.00718.59
8.3.20.0040.01520.33
8.3.10.0000.01723.71
8.3.00.0070.00317.93
8.2.180.0190.00316.50
8.2.170.0140.00422.96
8.2.160.0070.00720.14
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.62
8.2.110.0000.01021.02
8.2.100.0080.00417.50
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0030.00618.05
8.2.50.0050.00318.07
8.2.40.0050.00321.05
8.2.30.0050.00319.84
8.2.20.0000.00817.58
8.2.10.0000.00818.09
8.2.00.0040.00418.06
8.1.280.0140.00725.92
8.1.270.0100.01020.32
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00320.96
8.1.230.0120.00017.66
8.1.220.0070.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00917.23
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0040.00418.60
8.1.160.0040.00423.71
8.1.150.0050.00218.82
8.1.140.0040.00417.38
8.1.130.0000.00717.76
8.1.120.0050.00317.47
8.1.110.0030.00617.47
8.1.100.0050.00317.49
8.1.90.0080.00017.38
8.1.80.0040.00417.35
8.1.70.0000.00817.47
8.1.60.0000.00917.58
8.1.50.0050.00317.51
8.1.40.0040.00417.51
8.1.30.0080.00017.58
8.1.20.0000.00817.56
8.1.10.0000.00817.51
8.1.00.0000.00817.45
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.52
8.0.270.0030.00517.29
8.0.260.0000.00817.38
8.0.250.0080.00017.00
8.0.240.0000.00716.97
8.0.230.0040.00416.95
8.0.220.0000.00716.85
8.0.210.0000.00716.94
8.0.200.0070.00016.96
8.0.190.0080.00016.88
8.0.180.0030.00915.95
8.0.170.0040.00416.92
8.0.160.0000.00716.83
8.0.150.0040.00416.82
8.0.140.0000.00716.83
8.0.130.0000.00513.34
8.0.120.0030.00616.77
8.0.110.0050.00216.79
8.0.100.0040.00416.96
8.0.90.0000.00716.71
8.0.80.0090.01216.93
8.0.70.0050.00316.69
8.0.60.0040.00416.98
8.0.50.0070.00016.73
8.0.30.0100.00617.00
8.0.20.0070.01117.40
8.0.10.0030.00516.84
8.0.00.0070.01116.82
7.4.330.0050.00015.08
7.4.320.0000.00716.45
7.4.300.0000.00616.65
7.4.290.0030.00316.61
7.4.280.0050.00516.61
7.4.270.0070.00016.68
7.4.260.0040.00416.46
7.4.250.0050.00316.58
7.4.240.0020.00516.68
7.4.230.0040.00416.43
7.4.220.0090.01516.63
7.4.210.0090.00616.73
7.4.200.0000.00816.73
7.4.160.0100.00716.68
7.4.150.0120.00617.40
7.4.140.0070.01417.86
7.4.130.0120.00516.55
7.4.120.0050.01216.63
7.4.110.0120.00916.50
7.4.100.0110.01116.47
7.4.90.0140.00816.57
7.4.80.0090.00919.39
7.4.70.0100.01016.29
7.4.60.0070.01016.38
7.4.50.0040.00416.39
7.4.40.0120.00416.37
7.4.30.0090.01016.65
7.4.00.0070.00715.07
7.3.330.0000.00513.17
7.3.320.0050.00013.26
7.3.310.0030.00616.26
7.3.300.0070.00016.23
7.3.290.0060.01216.24
7.3.280.0070.01016.25
7.3.270.0090.01517.40
7.3.260.0070.01016.46
7.3.250.0130.00616.30
7.3.240.0140.00316.34
7.3.230.0170.00316.39
7.3.210.0100.00716.28
7.3.200.0130.00619.39
7.3.190.0030.01216.30
7.3.180.0080.00816.57
7.3.170.0070.01016.44
7.3.160.0030.01416.29
7.3.10.0140.01116.45
7.3.00.0120.00316.27
7.2.330.0130.00416.68
7.2.320.0100.00716.68
7.2.310.0070.01116.57
7.2.300.0080.01016.77
7.2.290.0150.00916.63
7.2.130.0160.00916.41
7.2.120.0230.01316.60
7.2.110.0180.00716.57
7.2.100.0090.00416.29
7.2.90.0030.01316.84
7.2.80.0000.01416.94
7.2.70.0120.00616.64
7.2.60.0110.00316.73
7.2.50.0060.01116.56
7.2.40.0080.01616.90
7.2.30.0120.00616.66
7.2.20.0060.00916.36
7.2.10.0080.00816.53
7.2.00.0110.00716.72
7.1.250.0040.01115.23
7.1.200.0030.00615.56
7.1.100.0070.01018.21
7.1.70.0100.00317.15
7.1.60.0110.01520.03
7.1.50.0040.00716.87
7.1.00.0100.06722.30
7.0.200.0070.00016.73
7.0.60.0030.06320.07
7.0.50.0070.06317.89
7.0.40.0070.04320.25
7.0.30.0470.04020.24
7.0.20.0270.05320.24
7.0.10.0030.09320.24
7.0.00.0000.04720.23
5.6.280.0000.06020.82
5.6.210.0070.07020.77
5.6.200.0070.04718.29
5.6.190.0030.04720.55
5.6.180.0470.06720.34
5.6.170.0330.07020.38
5.6.160.0070.04320.44
5.6.150.0030.04018.26
5.6.140.0070.08018.24
5.6.130.0130.08018.18
5.6.120.0030.07721.11
5.6.110.0100.08320.89
5.6.100.0130.07721.14
5.6.90.0130.08721.00
5.6.80.0100.07720.38
5.5.350.0030.06720.36
5.5.340.0100.08017.96
5.5.330.0130.03720.28
5.5.320.3770.04320.38
5.5.310.0370.07020.23
5.5.300.0030.05317.99
5.5.290.0070.05718.03
5.5.280.0030.04020.88
5.5.270.0100.05020.72
5.5.260.0000.06020.84
5.5.250.0130.08020.68
5.5.240.0030.07720.37
5.4.450.0230.05319.34
5.4.440.0230.05719.61
5.4.430.0270.05019.58
5.4.420.0270.04719.57
5.4.410.0200.05319.45
5.4.400.0170.05719.23
5.4.390.0230.05018.91
5.4.380.0130.06019.28
5.4.370.0370.04019.02
5.4.360.0200.05319.13
5.4.350.0200.05318.97
5.4.340.0330.04319.05
5.4.320.0200.05719.29
5.4.310.0370.03718.87
5.4.300.0300.04318.86
5.4.290.0330.04019.01
5.4.280.0200.06019.22
5.4.270.0200.05718.84
5.4.260.0300.04719.12
5.4.250.0170.05719.28
5.4.240.0170.06019.25
5.4.230.0100.06019.28
5.4.220.0330.04718.83
5.4.210.0300.04718.90
5.4.200.0170.05316.89
5.4.190.0230.05019.34
5.4.180.0200.05319.29
5.4.170.0200.05318.98
5.4.160.0230.05019.08
5.4.150.0170.05718.85
5.4.140.0270.04316.59
5.4.130.0230.04716.77
5.4.120.0270.04316.39
5.4.110.0130.05716.45
5.4.100.0200.05016.55
5.4.90.0130.06016.57
5.4.80.0330.04016.59
5.4.70.0270.04716.47
5.4.60.0230.05016.49
5.4.50.0200.04716.47
5.4.40.0170.05716.52
5.4.30.0330.03716.45
5.4.20.0270.04716.46
5.4.10.0230.05016.51
5.4.00.0370.04316.25

preferences:
53.29 ms | 401 KiB | 5 Q