3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Color { public function __construct(public string $name) {} } $white = new Color("white"); $blue = new Color("blue"); foreach([ 'white == blue' => $white == $blue, 'white === blue' => $white === $blue, 'white == white' => $white == new Color("white"), 'white === white' => $white === new Color("white"), ] as $m => $v) { $v = $v ? "true" : "false"; echo "$m: $v\n"; }

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.4.140.0350.00917.62
8.4.130.0320.01217.36
8.4.120.0390.00717.54
8.4.110.0400.00717.77
8.4.100.0400.00617.73
8.4.90.0400.00817.86
8.4.80.0490.00917.70
8.4.70.0420.00817.77
8.4.60.0380.00917.50
8.4.50.0380.00917.73
8.4.40.0430.00917.40
8.4.30.0400.00817.36
8.4.20.0400.00917.42
8.4.10.0400.00817.49
8.3.270.0360.00816.76
8.3.260.0350.00916.25
8.3.250.0330.01116.70
8.3.240.0370.00616.43
8.3.230.0390.00616.42
8.3.220.0370.00916.44
8.3.210.0380.00616.70
8.3.200.0410.00416.78
8.3.190.0390.00916.38
8.3.180.0410.00916.37
8.3.170.0380.00916.46
8.3.160.0370.01116.62
8.3.150.0390.00916.32
8.3.140.0390.00816.65
8.3.130.0280.01516.49
8.3.120.0340.00716.11
8.3.110.0350.01016.16
8.3.100.0440.01116.25
8.3.90.0430.00716.41
8.3.80.0380.00916.67
8.3.70.0360.01216.47
8.3.60.0370.01016.73
8.3.50.0350.01116.28
8.3.40.0360.01017.57
8.3.30.0320.00717.38
8.3.20.0340.00717.56
8.3.10.0340.00817.48
8.3.00.0310.01017.53
8.2.290.0280.01016.61
8.2.280.0260.01116.37
8.2.270.0300.01016.79
8.2.260.0330.00716.28
8.2.250.0400.01016.68
8.2.240.0330.00816.43
8.2.230.0330.00616.46
8.2.220.0320.00916.28
8.2.210.0340.00916.24
8.2.200.0290.01216.55
8.2.190.0340.00716.77
8.2.180.0340.01116.67
8.2.170.0360.00717.74
8.2.160.0410.00317.66
8.2.150.0330.00817.54
8.2.140.0350.00917.57
8.2.130.0340.00917.66
8.2.120.0380.00717.55
8.2.110.0420.00717.81
8.2.100.0370.00417.48
8.2.90.0340.00717.61
8.2.80.0360.00617.68
8.2.70.0350.00517.54
8.2.60.0380.00717.23
8.2.50.0420.01217.42
8.2.40.0340.00817.32
8.2.30.0310.01117.44
8.2.20.0340.00717.52
8.2.10.0320.00817.49
8.2.00.0320.00717.32

preferences:
33.92 ms | 403 KiB | 5 Q