3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { private $color; private $size; public function __construct($color, $size) { $this->color = $color; $this->size = $size; } public function describe() { return "A $this->size $this->color car."; } } $callable = [new \ReflectionClass('Car'), 'newInstance']; $cars = []; $cars[] = call_user_func($callable, 'red', 'big')->describe(); $cars[] = call_user_func_array($callable, ['blue', 'small'])->describe(); var_export($cars);

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.00.0120.00920.04
8.4.150.0010.00114.05
8.4.140.0140.00817.79
8.4.130.0120.00917.57
8.4.120.0140.00620.80
8.4.110.0140.00720.57
8.4.100.0130.00817.83
8.4.90.0060.00718.92
8.4.80.0050.00417.80
8.4.70.0140.00817.68
8.4.60.0130.00418.39
8.4.50.0050.00617.97
8.4.40.0110.00923.93
8.4.30.0150.00317.82
8.4.20.0100.01017.79
8.4.10.0030.01719.22
8.3.280.0140.01218.41
8.3.270.0110.00816.73
8.3.260.0120.00816.25
8.3.250.0100.00619.15
8.3.240.0140.00516.38
8.3.230.0150.00416.50
8.3.220.0140.00517.37
8.3.210.0070.01216.73
8.3.200.0040.00516.62
8.3.190.0040.00517.39
8.3.180.0050.00416.83
8.3.170.0140.00018.94
8.3.160.0150.00316.60
8.3.150.0160.00320.80
8.3.140.0000.00817.51
8.3.130.0050.00318.67
8.3.120.0030.00518.79
8.3.110.0060.00916.65
8.3.100.0000.00924.06
8.3.90.0000.00826.77
8.3.80.0060.00316.63
8.3.70.0110.00418.43
8.3.60.0110.00716.75
8.3.50.0140.00216.52
8.3.40.0070.00719.02
8.3.30.0070.00718.84
8.3.20.0070.00020.29
8.3.10.0070.00021.72
8.3.00.0040.00419.50
8.2.290.0080.01120.67
8.2.280.0100.00820.12
8.2.270.0070.01116.95
8.2.260.0070.01018.13
8.2.250.0040.00417.09
8.2.240.0070.01318.93
8.2.230.0040.00420.94
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0090.00316.50
8.2.190.0140.00016.58
8.2.180.0140.00716.38
8.2.170.0090.00622.96
8.2.160.0120.00319.04
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0040.00421.02
8.2.120.0050.00326.35
8.2.110.0030.00720.25
8.2.100.0060.00617.72
8.2.90.0000.00817.88
8.2.80.0080.00018.73
8.2.70.0040.00417.62
8.2.60.0000.00819.35
8.2.50.0090.00017.63
8.2.40.0060.00317.62
8.2.30.0080.00021.02
8.2.20.0040.00418.19
8.2.10.0040.00418.08
8.2.00.0030.00518.17
8.1.330.0090.00922.10
8.1.320.0120.00716.00
8.1.310.0030.00516.73
8.1.300.0160.00319.78
8.1.290.0030.00630.84
8.1.280.0170.00025.92
8.1.270.0100.01022.11
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0080.00020.16
8.1.230.0040.00817.60
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0050.00317.47
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00419.02
8.1.160.0070.00018.96
8.1.150.0050.00218.96
8.1.140.0040.00419.58
8.1.130.0040.00417.45
8.1.120.0000.00817.49
8.1.110.0050.00217.29
8.1.100.0030.00617.36
8.1.90.0000.01017.35
8.1.80.0040.00417.49
8.1.70.0030.00317.35
8.1.60.0000.00717.49
8.1.50.0000.00817.50
8.1.40.0040.00417.54
8.1.30.0040.00417.55
8.1.20.0030.00617.67
8.1.10.0000.00717.55
8.1.00.0040.00417.53
8.0.300.0030.00618.77
8.0.290.0060.00316.63
8.0.280.0000.00818.35
8.0.270.0070.00017.12
8.0.260.0070.00016.73
8.0.250.0070.00016.88
8.0.240.0030.00316.96
8.0.230.0000.00816.98
8.0.220.0000.00716.89
8.0.210.0070.00016.91
8.0.200.0040.00416.93
8.0.190.0040.00416.86
8.0.180.0040.00416.80
8.0.170.0000.00716.95
8.0.160.0040.00416.90
8.0.150.0000.00816.79
8.0.140.0000.00716.83
8.0.130.0050.00013.29
8.0.120.0050.00216.75
8.0.110.0040.00416.79
8.0.100.0040.00416.90
8.0.90.0000.00716.78
8.0.80.0100.00616.87
8.0.70.0030.00516.69
8.0.60.0000.00716.78
8.0.50.0000.00816.71
8.0.30.0080.01216.99
8.0.20.0070.01217.40
8.0.10.0000.00716.91
8.0.00.0090.01216.92
7.4.330.0000.00515.55
7.4.320.0000.00616.61
7.4.300.0000.00616.47
7.4.290.0030.00616.41
7.4.280.0000.00716.63
7.4.270.0030.00316.54
7.4.260.0030.00316.59
7.4.250.0060.00316.56
7.4.240.0040.00416.54
7.4.230.0000.00716.50
7.4.220.0060.01216.47
7.4.210.0110.00516.53
7.4.200.0030.00316.58
7.4.160.0110.00916.50
7.4.150.0030.01317.40
7.4.140.0060.01317.86
7.4.130.0150.00316.39
7.4.120.0140.00416.52
7.4.110.0070.01016.57
7.4.100.0030.01516.55
7.4.90.0150.00316.62
7.4.80.0130.00319.39
7.4.70.0120.00416.55
7.4.60.0060.00916.49
7.4.50.0060.01216.28
7.4.40.0060.01516.64
7.4.30.0100.00716.62
7.4.00.0090.00614.87
7.3.330.0030.00313.18
7.3.320.0000.00513.34
7.3.310.0070.00016.21
7.3.300.0040.00416.31
7.3.290.0030.00316.18
7.3.280.0100.01116.28
7.3.270.0120.00617.40
7.3.260.0070.01616.34
7.3.250.0110.00616.39
7.3.240.0100.01416.56
7.3.230.0060.01016.27
7.3.210.0140.00416.34
7.3.200.0090.00616.55
7.3.190.0030.01316.38
7.3.180.0000.01616.18
7.3.170.0090.00616.21
7.3.160.0090.00616.20
7.2.330.0130.00316.69
7.2.320.0120.00816.32
7.2.310.0060.01016.80
7.2.300.0100.00616.65
7.2.290.0120.00916.77
7.2.60.0000.01016.94
7.2.00.0060.00619.26
7.1.200.0070.00715.85
7.1.100.0040.00817.83
7.1.70.0100.00716.87
7.1.60.0160.01334.84
7.1.50.0180.01134.63
7.1.40.0130.01634.36
7.1.30.0290.01134.45
7.1.20.0130.01734.54
7.1.10.0070.00716.53
7.1.00.0030.01016.68
7.0.200.0030.00916.71
7.0.190.0060.00616.69
7.0.180.0090.00316.22
7.0.170.0060.01016.23
7.0.160.0000.01216.20
7.0.150.0000.01416.50
7.0.140.0070.01116.29
7.0.130.0100.00316.57
7.0.120.0060.00616.46
7.0.110.0060.00616.41
7.0.100.0060.00616.15
7.0.90.0030.00916.23
7.0.80.0070.00716.50
7.0.70.0130.00316.30
7.0.60.0060.00616.15
7.0.50.0030.01016.48
7.0.40.0090.00916.61
7.0.30.0070.00716.46
7.0.20.0070.00716.34
7.0.10.0000.01316.52
7.0.00.0030.00916.39

preferences:
30.56 ms | 403 KiB | 5 Q