3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); enum Foo: int { case A = 1; case B = 2; } var_dump(Foo::A > Foo::B); // I expect an error here as it is always false (enum cases are not comparable and always return false) var_dump(Foo::A < Foo::B); // I expect an error here as it is always false (enum cases are not comparable and always return false) var_dump(Foo::A === Foo::B); // OK var_dump(Foo::A == Foo::B); // I expect an error here as it is always false (enum cases are not comparable and always return false) var_dump(Foo::A === Foo::A); // I expect an error here as it is always true var_dump(Foo::A->value > Foo::B->value); // OK var_dump(Foo::A->value < Foo::B->value); // OK var_dump(Foo::A->value === Foo::B->value); // OK var_dump(Foo::A->value == Foo::B->value); // I'd probably expect an error here as well as always false var_dump(Foo::A->value === Foo::A->value); // I'd probably expect an error here as well as this is always true

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.30.0030.00420.11
8.5.20.0070.00920.09
8.5.10.0130.00418.63
8.5.00.0080.01220.05
8.4.180.0120.00825.75
8.4.170.0120.01023.70
8.4.160.0090.01223.83
8.4.150.0020.00014.05
8.4.140.0150.00717.48
8.4.130.0110.00917.44
8.4.120.0150.00420.64
8.4.110.0030.00618.16
8.4.100.0130.00717.96
8.4.90.0060.00320.48
8.4.80.0150.00519.07
8.4.70.0100.00822.40
8.4.60.0130.00720.61
8.4.50.0090.01118.58
8.4.40.0100.01019.23
8.4.30.0120.00920.46
8.4.20.0100.00017.80
8.4.10.0160.00025.66
8.3.300.0130.00822.81
8.3.290.0130.00920.87
8.3.280.0110.00818.48
8.3.270.0050.01516.45
8.3.260.0090.01016.68
8.3.250.0130.00618.95
8.3.240.0130.00616.64
8.3.230.0160.00316.55
8.3.220.0100.00818.86
8.3.210.0080.00816.74
8.3.200.0070.00316.64
8.3.190.0080.00317.27
8.3.180.0100.00817.22
8.3.170.0030.00620.61
8.3.160.0160.00318.52
8.3.150.0150.00417.29
8.3.140.0070.01116.39
8.3.130.0030.00618.20
8.3.120.0060.00318.43
8.3.110.0040.01518.31
8.3.50.0110.01418.24
8.2.300.0130.00718.10
8.2.290.0080.00616.48
8.2.280.0100.00618.22
8.2.270.0040.00417.05
8.2.260.0120.00316.39
8.2.250.0060.00316.71
8.2.240.0040.00418.22
8.2.230.0110.00718.03
8.2.200.0180.01130.84
8.1.340.0170.01019.82
8.1.330.0130.00615.90
8.1.320.0070.00316.15
8.1.310.0060.00315.97
8.1.300.0030.00617.98
8.1.50.0030.00617.45

preferences:
30.46 ms | 475 KiB | 5 Q