3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { private $a; public function __construct($a) { $this->a = (bool) $a; } public function a() { return $this->a; } } function foo(callable $x) { $object = new Bar(false); $x($object); return $object->a(); } var_dump(foo('Bar::__construct'));

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.10.0090.01116.69
8.5.00.0160.00619.94
8.4.150.0010.00114.05
8.4.140.0140.00617.91
8.4.130.0110.00919.64
8.4.120.0100.01022.40
8.4.110.0130.00722.49
8.4.100.0110.01017.84
8.4.90.0070.00518.80
8.4.80.0080.00817.98
8.4.70.0100.00617.80
8.4.60.0110.00918.88
8.4.50.0130.00720.37
8.4.40.0120.00819.55
8.4.30.0090.00617.77
8.4.20.0090.00417.80
8.4.10.0000.01017.86
8.3.280.0100.01120.29
8.3.270.0160.00616.58
8.3.260.0090.01016.67
8.3.250.0080.01118.77
8.3.240.0090.00216.52
8.3.230.0080.00116.84
8.3.220.0050.00316.97
8.3.210.0100.00716.75
8.3.200.0030.00616.76
8.3.190.0090.00716.95
8.3.180.0070.01316.54
8.3.170.0000.00817.00
8.3.160.0060.01218.35
8.3.150.0140.00417.20
8.3.140.0060.01216.88
8.3.130.0150.00018.45
8.3.120.0080.01118.90
8.3.110.0060.00316.76
8.3.100.0130.00718.41
8.3.90.0040.00426.77
8.3.80.0000.01019.36
8.3.70.0090.01218.11
8.3.60.0160.00316.63
8.3.50.0050.00818.31
8.3.40.0000.01818.80
8.3.30.0040.01118.84
8.3.20.0000.00821.85
8.3.10.0040.00421.63
8.3.00.0050.00319.69
8.2.290.0060.00320.31
8.2.280.0070.00118.23
8.2.270.0140.00418.88
8.2.260.0050.00318.58
8.2.250.0040.01116.78
8.2.240.0000.01116.48
8.2.230.0030.00620.94
8.2.220.0000.00924.06
8.2.210.0050.00226.77
8.2.200.0030.00618.88
8.2.190.0140.00316.68
8.2.180.0150.00318.54
8.2.170.0060.00922.96
8.2.160.0100.00622.13
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00020.34
8.2.120.0140.00026.35
8.2.110.0070.00322.11
8.2.100.0040.00817.91
8.2.90.0080.00017.75
8.2.80.0030.00518.77
8.2.70.0080.00017.50
8.2.60.0000.00817.63
8.2.50.0040.00417.63
8.2.40.0000.00817.62
8.2.30.0070.00022.32
8.2.20.0040.00418.04
8.2.10.0040.00418.02
8.2.00.0040.00417.98
8.1.330.0100.00821.85
8.1.320.0040.00520.11
8.1.310.0040.00416.72
8.1.300.0040.00416.19
8.1.290.0060.00330.84
8.1.280.0040.01425.92
8.1.270.0080.00022.00
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0140.00519.30
8.1.230.0080.00420.96
8.1.220.0040.00418.52
8.1.210.0030.00518.77
8.1.200.0000.00817.64
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0000.00718.76
8.1.150.0030.00320.28
8.1.140.0060.00319.41
8.1.130.0030.00318.89
8.1.120.0040.00417.26
8.1.110.0030.00517.35
8.1.100.0000.00717.32
8.1.90.0030.00617.28
8.1.80.0000.00717.39
8.1.70.0050.00217.17
8.1.60.0050.00317.60
8.1.50.0050.00317.43
8.1.40.0000.00717.44
8.1.30.0040.00417.56
8.1.20.0000.00817.49
8.1.10.0040.00417.54
8.1.00.0030.00717.34
8.0.300.0000.00718.77
8.0.290.0030.00616.63
8.0.280.0040.00418.38
8.0.270.0070.00017.20
8.0.260.0080.00016.83
8.0.250.0030.00316.97
8.0.240.0030.00717.01
8.0.230.0030.00316.86
8.0.220.0000.00716.93
8.0.210.0030.00316.85
8.0.200.0050.00316.84
8.0.190.0040.00416.92
8.0.180.0040.00416.94
8.0.170.0030.00516.85
8.0.160.0050.00216.97
8.0.150.0000.00816.69
8.0.140.0080.00016.88
8.0.130.0000.00613.37
8.0.120.0040.00416.87
8.0.110.0000.00716.79
8.0.100.0060.00316.79
8.0.90.0050.00216.96
8.0.80.0090.00616.85
8.0.70.0040.00416.86
8.0.60.0000.00716.85
8.0.50.0070.00016.90
8.0.30.0150.00616.90
8.0.20.0120.00817.40
8.0.10.0070.00016.90
8.0.00.0100.00816.65
7.4.330.0000.00615.55
7.4.320.0000.00616.40
7.4.300.0030.00616.46
7.4.290.0000.00716.52
7.4.280.0000.00816.45
7.4.270.0030.00316.43
7.4.260.0030.00316.35
7.4.250.0030.00316.37
7.4.240.0000.00816.57
7.4.230.0030.00316.54
7.4.220.0030.00316.58
7.4.210.0100.00516.56
7.4.200.0000.00716.35
7.4.160.0110.00716.58
7.4.150.0090.01017.40
7.4.140.0100.00817.86
7.4.130.0110.00616.45
7.4.120.0080.01016.59
7.4.110.0060.01016.45
7.4.100.0080.01016.68
7.4.90.0120.02516.60
7.4.80.0200.00319.39
7.4.70.0050.01116.60
7.4.60.0060.00916.45
7.4.50.0050.01316.54
7.4.40.0140.00316.51
7.4.00.0080.00814.94
7.3.330.0000.00513.38
7.3.320.0030.00313.20
7.3.310.0000.00716.30
7.3.300.0000.00616.17
7.3.290.0000.00716.30
7.3.280.0060.01316.33
7.3.270.0080.01117.40
7.3.260.0130.00716.33
7.3.240.0090.00816.46
7.3.230.0110.01116.38
7.3.210.0120.00316.26
7.3.200.0100.01016.32
7.3.190.0090.00916.40
7.3.180.0130.00316.27
7.3.170.0080.00816.31
7.3.160.0100.00716.21
7.3.120.0090.00914.98
7.3.110.0040.01214.68
7.3.100.0060.01014.85
7.3.90.0000.01014.84
7.3.80.0090.00614.44
7.3.70.0030.01014.84
7.3.60.0030.00914.75
7.3.50.0030.00914.61
7.3.40.0060.00614.68
7.3.30.0030.01014.57
7.3.20.0040.01116.48
7.3.10.0030.00916.61
7.3.00.0030.00616.72
7.2.330.0070.01716.32
7.2.320.0100.01016.52
7.2.310.0100.01316.43
7.2.300.0120.00616.61
7.2.290.0090.00816.57
7.2.250.0100.00314.79
7.2.240.0040.01515.03
7.2.230.0070.00715.01
7.2.220.0060.00614.87
7.2.210.0000.01015.11
7.2.200.0000.01415.01
7.2.190.0070.00714.95
7.2.180.0030.01514.97
7.2.170.0090.00614.68
7.2.60.0130.01316.59
7.2.20.0080.01119.79
7.2.10.0090.00919.89
7.2.00.0060.01219.49
7.1.330.0030.00915.69
7.1.320.0000.01515.52
7.1.310.0060.00315.54
7.1.300.0060.00615.52
7.1.290.0110.00415.59
7.1.280.0040.00415.38
7.1.270.0060.00615.34
7.1.260.0100.00715.43
7.1.200.0060.00615.37
7.1.140.0090.00918.44
7.1.130.0080.00918.66
7.1.120.0080.00818.68
7.1.110.0070.01318.05
7.1.100.0070.01018.00
7.1.90.0070.01417.63
7.1.80.0070.00917.81
7.1.70.0070.01316.90
7.1.60.0220.01435.06
7.1.50.0300.01634.56
7.1.40.0300.01834.18
7.1.30.0270.02034.37
7.1.20.0290.01634.38
7.1.10.0040.01516.44
7.1.00.0040.01216.52

preferences:
40.09 ms | 403 KiB | 5 Q