3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public function __construct(private int|float $multiplierEffect) { } public function doCalculation(int|float $input): int|float { $n = new \BcMath\Number($input); return $n->mul($this->multiplierEffect)->value; } } $test = new Test(3.4); var_dump($test->doCalculation(1.6));

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.100.0070.00516.99
8.5.90.0040.00416.88
8.5.80.0030.00516.88
8.5.70.0070.00117.12
8.5.60.0070.00416.84
8.5.50.0050.00316.89
8.5.40.0050.00316.82
8.5.30.0130.00516.96
8.5.20.0050.00316.86
8.5.10.0030.00416.95
8.5.00.0040.00316.90
8.4.250.0100.00519.61
8.4.240.0100.00419.61
8.4.230.0040.00619.56
8.4.220.0110.01019.53
8.4.210.0110.00819.64
8.4.200.0110.01019.61
8.4.190.0100.00919.66
8.4.180.0090.00519.79
8.4.170.0080.00619.77
8.4.160.0130.00919.61
8.4.150.0070.00419.61
8.4.140.0140.00617.80
8.4.130.0120.00617.78
8.4.120.0080.00218.07
8.4.110.0140.00518.02
8.4.100.0080.01117.98
8.4.90.0130.00617.91
8.4.80.0090.00518.04
8.4.70.0100.00417.92
8.4.60.0110.00817.98
8.4.50.0140.00717.92
8.4.40.0070.00717.93
8.4.30.0060.00317.85
8.4.20.0060.00517.83
8.4.10.0080.00917.77
8.3.330.0070.00418.35
8.3.320.0090.01118.54
8.3.310.0120.00918.50
8.3.300.0090.00218.43
8.3.290.0040.01018.39
8.3.280.0050.00518.39
8.3.270.0120.00716.79
8.3.260.0100.00716.91
8.3.250.0100.00716.74
8.3.240.0060.00316.82
8.3.230.0080.00516.96
8.3.220.0040.00516.81
8.3.210.0100.00516.88
8.3.200.0120.00616.74
8.3.190.0080.01016.81
8.3.180.0120.00616.74
8.3.170.0150.00616.86
8.3.160.0070.00616.81
8.3.150.0030.00516.87
8.3.140.0060.00316.80
8.3.130.0080.00616.79
8.3.120.0120.00616.81
8.3.110.0090.00716.91
8.3.100.0080.01016.91
8.3.90.0080.00416.80
8.3.80.0060.00216.79
8.3.70.0080.01116.80
8.3.60.0100.00616.92
8.3.50.0040.00716.85
8.3.40.0100.00918.21
8.3.30.0110.00818.09
8.3.20.0080.00418.13
8.3.10.0060.00418.16
8.3.00.0130.00318.16
8.2.330.0070.01118.12
8.2.320.0110.00918.25
8.2.310.0120.00818.19

preferences:
43.98 ms | 798 KiB | 5 Q