3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $foo; protected $bar; protected $baz; } class FooSelfHydratingProxy extends Foo { /** zero-argument constructor since this is just a helper class for hydration */ public function __construct() { } /** * the `Foo` typehint is not part of the interface - here only for the sake of readability/clearness */ public function hydrate($data, Foo $object) { $object->foo = $data['foo']; $object->bar = $data['bar']; $object->baz = $data['baz']; } /** * the `Foo` typehint is not part of the interface - here only for the sake of readability/clearness */ public function extract(Foo $object) { return array('foo' => $object->foo, 'bar' => $object->bar, 'baz' => $object->baz); } } $data = array('foo' => 1, 'bar' => 2, 'baz' => 3); $hydrator = new FooSelfHydratingProxy(); $hydrated = new Foo(); $hydrator->hydrate(array('foo' => 1, 'bar' => 2, 'baz' => 3), $hydrated); var_dump($hydrated);

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.00316.50
8.3.50.0100.00821.98
8.3.40.0070.00718.59
8.3.30.0080.00619.22
8.3.20.0030.00520.34
8.3.10.0080.00023.53
8.3.00.0040.00419.26
8.2.180.0070.00718.16
8.2.170.0040.01122.96
8.2.160.0100.01020.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00822.14
8.2.110.0090.00320.95
8.2.100.0000.01217.84
8.2.90.0080.00017.50
8.2.80.0030.00617.97
8.2.70.0080.00458.72
8.2.60.0040.00417.92
8.2.50.0060.00318.07
8.2.40.0030.00619.94
8.2.30.0080.00017.93
8.2.20.0040.00417.73
8.2.10.0030.00618.05
8.2.00.0080.00317.78
8.1.280.0160.00925.92
8.1.270.0080.00421.84
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00022.54
8.1.230.0070.00320.97
8.1.220.0030.00617.76
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0040.00417.40
8.1.180.0040.00418.10
8.1.170.0030.00618.54
8.1.160.0040.00421.87
8.1.150.0000.00718.57
8.1.140.0000.00717.46
8.1.130.0030.00317.83
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0000.00717.42
8.1.90.0050.00517.33
8.1.80.0080.00317.34
8.1.70.0060.00617.24
8.1.60.0050.00617.52
8.1.50.0070.00417.48
8.1.40.0100.00317.43
8.1.30.0070.00617.63
8.1.20.0080.00617.58
8.1.10.0110.00217.48
8.1.00.0050.00617.39
8.0.300.0040.00419.88
8.0.290.0050.00216.93
8.0.280.0040.00418.43
8.0.270.0070.00016.73
8.0.260.0030.00317.20
8.0.250.0030.00316.97
8.0.240.0000.00616.95
8.0.230.0000.00716.95
8.0.220.0060.00516.83
8.0.210.0050.00616.82
8.0.200.0080.00316.89
8.0.190.0030.00916.92
8.0.180.0100.00116.89
8.0.170.0030.00916.89
8.0.160.0050.00616.88
8.0.150.0040.00716.80
8.0.140.0040.00816.70
8.0.130.0050.00615.05
8.0.120.0050.00616.82
8.0.110.0040.00716.79
8.0.100.0060.00516.68
8.0.90.0060.00516.83
8.0.80.0100.00516.84
8.0.70.0080.00416.77
8.0.60.0090.00316.77
8.0.50.0060.00616.80
8.0.30.0090.01016.91
8.0.20.0100.01117.15
8.0.10.0150.00617.00
8.0.00.0120.00816.94
7.4.330.0000.00515.03
7.4.320.0060.00016.39
7.4.300.0040.00316.50
7.4.290.0080.00316.56
7.4.280.0060.00416.45
7.4.270.0120.00016.54
7.4.260.0100.00316.50
7.4.250.0080.00416.45
7.4.240.0040.00516.56
7.4.230.0090.00216.53
7.4.220.0050.01216.54
7.4.210.0100.00816.54
7.4.200.0120.00016.57
7.4.190.0080.00416.64
7.4.180.0120.00316.67
7.4.160.0160.00716.53
7.4.150.0140.00916.78
7.4.140.0130.00617.02
7.4.130.0150.00616.44
7.4.120.0100.00916.48
7.4.110.0080.01116.34
7.4.100.0130.00616.51
7.4.90.0130.00616.44
7.4.80.0130.00617.09
7.4.70.0140.00616.46
7.4.60.0120.00616.31
7.4.50.0130.00316.33
7.4.40.0080.00817.98
7.4.30.0100.00916.38
7.4.20.0100.00816.29
7.4.10.0090.00916.05
7.4.00.0090.00615.95
7.3.330.0070.00314.85
7.3.320.0060.00414.77
7.3.310.0070.00416.24
7.3.300.0060.00516.24
7.3.290.0040.01016.30
7.3.280.0110.00716.26
7.3.270.0170.00416.16
7.3.260.0130.00816.29
7.3.250.0130.00616.39
7.3.240.0110.00916.26
7.3.230.0120.00616.34
7.3.220.0100.00816.41
7.3.210.0140.00616.38
7.3.200.0140.00717.08
7.3.190.0140.00616.28
7.3.180.0100.00916.31
7.3.170.0110.00716.24
7.3.160.0120.00716.29
7.3.150.0150.00516.22
7.3.140.0110.00616.27
7.3.130.0110.00715.91
7.3.120.0120.00615.73
7.3.110.0160.00315.80
7.3.100.0110.00715.65
7.3.90.0110.00715.74
7.3.80.0130.00615.59
7.3.70.0130.00615.48
7.3.60.0110.00815.27
7.3.50.0120.00515.30
7.3.40.0090.00815.31
7.3.30.0080.01015.29
7.3.20.0190.00615.79
7.3.10.0270.00615.72
7.3.00.0260.00815.79
7.2.340.0140.00716.38
7.2.330.0120.00816.44
7.2.320.0110.01016.46
7.2.310.0120.00816.32
7.2.300.0120.00816.43
7.2.290.0120.00816.46
7.2.280.0100.01016.31
7.2.270.0090.01116.41
7.2.260.0170.00615.92
7.2.250.0110.01116.04
7.2.240.0140.00815.92
7.2.230.0150.00815.89
7.2.220.0100.00915.74
7.2.210.0130.00715.82
7.2.200.0120.00815.58
7.2.190.0140.00915.33
7.2.180.0090.00915.44
7.2.170.0100.00815.51
7.2.160.0100.00815.49
7.2.150.0210.00716.12
7.2.140.0250.00716.06
7.2.130.0320.00916.03
7.2.120.0260.00816.01
7.2.110.0240.00715.98
7.2.100.0160.00716.09
7.2.90.0160.00915.96
7.2.80.0280.00815.86
7.2.70.0270.00816.06
7.2.60.0240.00816.10
7.2.50.0230.00916.07
7.2.40.0330.00716.32
7.2.30.0410.00916.39
7.2.20.0430.00916.45
7.2.10.0370.00916.46
7.2.00.0360.00916.46
7.1.330.0190.00415.67
7.1.320.0130.00715.21
7.1.310.0130.00715.38
7.1.300.0110.00915.20
7.1.290.0130.00815.25
7.1.280.0110.00915.27
7.1.270.0150.00715.24
7.1.260.0120.00815.21
7.1.250.0250.00714.94
7.1.240.0270.00714.80
7.1.230.0230.01015.00
7.1.220.0510.01014.87
7.1.210.0200.01014.78
7.1.200.0260.00814.90
7.1.190.0410.00614.99
7.1.180.0250.00714.99
7.1.170.0270.00714.94
7.1.160.0400.00915.23
7.1.150.0430.00815.23
7.1.140.0430.00815.32
7.1.130.0510.01015.37
7.1.120.0350.00815.33
7.1.110.0310.00815.24
7.1.100.0320.00815.33
7.1.90.0370.00715.20
7.1.80.0350.00815.27
7.1.70.0330.00715.03
7.1.60.0400.00818.89
7.1.50.0470.01018.82
7.1.40.0290.01018.74
7.1.30.0360.00718.82
7.1.20.0300.01018.76
7.1.10.0310.00814.87
7.1.00.0340.00615.08
7.0.330.0250.00914.45
7.0.320.0310.00814.26
7.0.310.0280.00914.55
7.0.300.0330.00614.64
7.0.290.0430.00814.84
7.0.280.0250.01114.57
7.0.270.0390.00914.97
7.0.260.0400.01014.93
7.0.250.0370.00614.89
7.0.240.0360.00814.87
7.0.230.0390.00814.91
7.0.220.0330.00914.92
7.0.210.0370.00814.63
7.0.200.0430.00714.60
7.0.190.0400.00714.61
7.0.180.0330.00714.52
7.0.170.0360.00814.55
7.0.160.0340.00814.58
7.0.150.0310.00814.50
7.0.140.0270.00714.60
7.0.130.0340.00914.76
7.0.120.0360.00814.73
7.0.110.0330.01014.71
7.0.100.0220.00914.56
7.0.90.0280.00814.57
7.0.80.0280.00714.65
7.0.70.0280.00814.62
7.0.60.0290.00914.56
7.0.50.0250.00814.55
7.0.40.0190.00914.46
7.0.30.0250.00714.51
7.0.20.0280.00714.51
7.0.10.0280.00814.51
7.0.00.0300.00814.49
5.6.400.0160.00714.86
5.6.390.0130.00714.85
5.6.380.0150.00714.77
5.6.370.0160.00714.78
5.6.360.0150.01014.85
5.6.350.0140.00914.82
5.6.340.0130.00914.88
5.6.330.0150.00814.86
5.6.320.0140.01114.81
5.6.310.0130.01114.85
5.6.300.0120.02016.05
5.6.290.0140.02016.13
5.6.280.0140.02016.11
5.6.270.0150.01916.12
5.6.260.0160.01716.12
5.6.250.0150.01916.11
5.6.240.0160.01916.16
5.6.230.0140.02016.10
5.6.220.0150.01916.11
5.6.210.0140.02116.10
5.6.200.0130.02016.03
5.6.190.0160.01816.12
5.6.180.0150.02016.19
5.6.170.0160.01916.10
5.6.160.0120.02016.09
5.6.150.0130.01916.14
5.6.140.0150.02016.07
5.6.130.0140.01716.10
5.6.120.0130.01916.13
5.6.110.0160.01916.09
5.6.100.0130.02016.14
5.6.90.0150.01916.10
5.6.80.0150.01715.92
5.6.70.0120.02015.93
5.6.60.0140.01815.89
5.6.50.0150.01815.93
5.6.40.0150.01715.90
5.6.30.0140.01915.88
5.6.20.0130.01915.90
5.6.10.0130.01815.93
5.6.00.0120.02015.88
5.5.380.0150.01714.76
5.5.370.0130.01614.79
5.5.360.0140.01914.75
5.5.350.0130.01914.72
5.5.340.0140.02014.88
5.5.330.0120.01814.83
5.5.320.0140.01814.91
5.5.310.0140.02014.92
5.5.300.0140.01714.83
5.5.290.0130.01914.87
5.5.280.0130.01814.90
5.5.270.0160.01714.84
5.5.260.0120.02014.84
5.5.250.0140.01814.82
5.5.240.0130.01814.70
5.5.230.0130.01814.74
5.5.220.0140.01714.70
5.5.210.0120.01814.64
5.5.200.0120.01714.68
5.5.190.0120.01714.69
5.5.180.0130.01914.64
5.5.170.0130.00714.13
5.5.160.0140.01814.63
5.5.150.0120.01714.67
5.5.140.0130.01714.74
5.5.130.0110.01814.74
5.5.120.0120.01714.61
5.5.110.0120.01814.61
5.5.100.0120.01914.64
5.5.90.0120.01714.67
5.5.80.0100.01914.62
5.5.70.0120.01914.63
5.5.60.0110.01814.66
5.5.50.0100.01914.66
5.5.40.0110.01814.65
5.5.30.0120.01714.63
5.5.20.0120.01814.63
5.5.10.0120.01814.63
5.5.00.0100.02014.61
5.4.450.0120.01713.52
5.4.440.0130.01513.49
5.4.430.0100.01713.53
5.4.420.0090.01813.52
5.4.410.0100.01813.47
5.4.400.0110.01613.42
5.4.390.0120.01713.39
5.4.380.0110.01813.34
5.4.370.0110.01713.39
5.4.360.0110.01613.38
5.4.350.0120.01713.36
5.4.340.0110.01713.41
5.4.330.0090.00711.92
5.4.320.0120.01513.45
5.4.310.0120.01513.35
5.4.300.0120.01513.40
5.4.290.0110.01613.41
5.4.280.0120.01613.38
5.4.270.0110.01613.38
5.4.260.0110.01513.39
5.4.250.0100.01813.33
5.4.240.0100.01813.38
5.4.230.0100.01913.40
5.4.220.0090.01713.35
5.4.210.0100.01613.33
5.4.200.0100.01813.38
5.4.190.0110.01513.37
5.4.180.0110.01513.39
5.4.170.0100.01713.36
5.4.160.0120.01413.41
5.4.150.0090.01713.43
5.4.140.0100.01612.86
5.4.130.0100.01512.82
5.4.120.0100.01512.86
5.4.110.0090.01812.90
5.4.100.0100.01512.89
5.4.90.0090.01612.86
5.4.80.0110.01312.88
5.4.70.0100.01512.92
5.4.60.0100.01412.85
5.4.50.0100.01512.88
5.4.40.0120.01712.92
5.4.30.0100.01512.87
5.4.20.0090.01612.90
5.4.10.0100.01512.85
5.4.00.0100.01612.73
5.3.290.0090.01912.47
5.3.280.0100.01812.32
5.3.270.0110.01612.41
5.3.260.0110.01712.36
5.3.250.0100.01512.42
5.3.240.0090.01612.34
5.3.230.0110.01412.33
5.3.220.0100.01712.36
5.3.210.0100.01812.29
5.3.200.0090.01612.30
5.3.190.0110.01312.33
5.3.180.0110.01512.43
5.3.170.0100.01512.40
5.3.160.0110.01412.41
5.3.150.0110.01512.40
5.3.140.0110.01612.35
5.3.130.0110.01612.35
5.3.120.0100.01612.31
5.3.110.0090.01912.33
5.3.100.0080.01712.20
5.3.90.0090.01512.24
5.3.80.0100.01512.13
5.3.70.0100.01512.14
5.3.60.0120.01512.22
5.3.50.0110.01812.15
5.3.40.0100.01512.21
5.3.30.0110.01612.20
5.3.20.0110.01412.11
5.3.10.0110.01312.03
5.3.00.0100.01512.04

preferences:
56.25 ms | 401 KiB | 5 Q