3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Which one is greatest? */ error_reporting(E_ALL ^ E_NOTICE); $inf = INF; $array = array(); $object = (object) $array; $InfGreaterThanArray = ($inf > $array); $InfGreaterThanObject = ($inf > $object); $arrayGreaterThanInf = ($array > $inf); $arrayGreaterThanObject = ($array > $object); $objectGreaterThanInf = ($object > $inf); $objectGreaterThanArray = ($object > array()); // Test1: Is INF greatest? echo 'Inf is Greatest...: ', var_dump($InfIsGreatest = ($InfGreaterThanObject and $InfGreaterThanArray)); // Test2: Is Array greatest? echo 'Array is Greatest.: ', var_dump($arrayIsGreatest = ($arrayGreaterThanInf and $arrayGreaterThanObject)); // Test3: Is Object greatest? echo 'Object is Greatest: ', var_dump($objectIsGreatest = ($objectGreaterThanInf and $objectGreaterThanArray)); // Test4: Undefined? echo 'Undefined.........: ', var_dump( $undefined = ( ($InfIsGreatest and $InfIsGreatest == $arrayIsGreatest) || ($arrayIsGreatest and $arrayIsGreatest == $objectIsGreatest) || (!$InfIsGreatest and ($InfIsGreatest == $arrayIsGreatest and $InfIsGreatest == $objectIsGreatest)) ) );

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.3.70.0070.00716.75
8.3.60.0090.00918.68
8.3.50.0120.00421.93
8.3.40.0140.00018.80
8.3.30.0100.00319.04
8.3.20.0060.00320.24
8.3.10.0040.00423.61
8.3.00.0030.00719.38
8.2.180.0100.00718.29
8.2.170.0000.01522.96
8.2.160.0070.00722.12
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00022.08
8.2.110.0000.00922.31
8.2.100.0040.00817.69
8.2.90.0040.00419.05
8.2.80.0000.00918.03
8.2.70.0060.00317.63
8.2.60.0030.00518.04
8.2.50.0060.00318.07
8.2.40.0030.00518.22
8.2.30.0040.00417.97
8.2.20.0080.00017.67
8.2.10.0050.00318.06
8.2.00.0110.00017.61
8.1.280.0030.01025.92
8.1.270.0000.00821.94
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.88
8.1.230.0110.00018.84
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0000.00917.41
8.1.180.0040.00418.10
8.1.170.0060.00318.55
8.1.160.0040.00422.00
8.1.150.0040.00418.63
8.1.140.0000.00719.57
8.1.130.0000.00717.82
8.1.120.0030.00317.31
8.1.110.0000.00717.34
8.1.100.0040.00417.41
8.1.90.0070.00017.45
8.1.80.0040.00417.43
8.1.70.0030.00317.38
8.1.60.0030.00617.61
8.1.50.0030.00617.52
8.1.40.0040.00417.41
8.1.30.0090.00017.58
8.1.20.0030.00617.53
8.1.10.0070.00017.39
8.1.00.0060.00317.32
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0080.00018.40
8.0.270.0030.00317.12
8.0.260.0000.00617.16
8.0.250.0060.00016.97
8.0.240.0070.00017.05
8.0.230.0070.00017.00
8.0.220.0000.00716.98
8.0.210.0030.00316.86
8.0.200.0030.00317.02
8.0.190.0000.00716.90
8.0.180.0040.00417.00
8.0.170.0030.00616.80
8.0.160.0050.00316.94
8.0.150.0060.00616.88
8.0.140.0040.00416.95
8.0.130.0000.00613.33
8.0.120.0050.00316.89
8.0.110.0070.00016.89
8.0.100.0040.00416.96
8.0.90.0040.00416.94
8.0.80.0040.01116.91
8.0.70.0040.00416.75
8.0.60.0000.00716.82
8.0.50.0000.00816.91
8.0.30.0080.01117.19
8.0.20.0110.01217.40
8.0.10.0000.00716.93
8.0.00.0090.00816.78
7.4.330.0030.00515.00
7.4.320.0000.00716.60
7.4.300.0000.00716.48
7.4.290.0030.00316.52
7.4.280.0030.00616.58
7.4.270.0040.00416.46
7.4.260.0000.00716.57
7.4.250.0040.00416.47
7.4.240.0030.00316.56
7.4.230.0000.00616.54
7.4.220.0100.01716.43
7.4.210.0070.00716.57
7.4.200.0040.00416.63
7.4.190.0050.00216.67
7.4.160.0070.01116.50
7.4.150.0080.00817.40
7.4.140.0070.01017.86
7.4.130.0060.01116.60
7.4.120.0070.01016.52
7.4.110.0160.00616.48
7.4.100.0090.01216.57
7.4.90.0080.00816.38
7.4.80.0130.00819.39
7.4.70.0080.00816.57
7.4.60.0120.00316.59
7.4.50.0000.00416.68
7.4.40.0130.00022.77
7.4.30.0100.00716.62
7.4.00.0070.00715.16
7.3.330.0000.00513.24
7.3.320.0030.00313.06
7.3.310.0030.00316.34
7.3.300.0000.00716.33
7.3.290.0100.00516.42
7.3.280.0090.00716.32
7.3.270.0050.01117.40
7.3.260.0160.00616.25
7.3.250.0080.01116.37
7.3.240.0060.00916.48
7.3.230.0000.01616.58
7.3.210.0110.00716.61
7.3.200.0120.00919.39
7.3.190.0150.00716.52
7.3.180.0160.00016.43
7.3.170.0140.00716.55
7.3.160.0080.00816.54
7.3.120.0080.00814.93
7.3.10.0110.00616.61
7.3.00.0070.00516.48
7.2.330.0150.00316.44
7.2.320.0060.01216.57
7.2.310.0130.00316.35
7.2.300.0130.00916.70
7.2.290.0040.01516.23
7.2.130.0050.01016.62
7.2.120.0060.01016.66
7.2.110.0090.00516.61
7.2.100.0070.00616.70
7.2.90.0040.00716.92
7.2.80.0060.00716.84
7.2.70.0050.00816.77
7.2.60.0070.00816.83
7.2.50.0040.01016.83
7.2.40.0050.00916.84
7.2.30.0110.00316.85
7.2.20.0060.00716.86
7.2.10.0090.00716.81
7.2.00.0050.00717.44
7.1.250.0050.00715.70
7.1.240.0100.00615.87
7.1.230.0040.00715.71
7.1.220.0030.01315.67
7.1.210.0030.01315.69
7.1.200.0120.00815.66
7.1.190.0040.00815.81
7.1.180.0070.00715.59
7.1.170.0060.00615.64
7.1.160.0130.00615.79
7.1.150.0040.00815.55
7.1.140.0090.00615.57
7.1.130.0080.00815.80
7.1.120.0150.00415.57
7.1.110.0040.00915.98
7.1.100.0030.00917.06
7.1.90.0060.00615.49
7.1.80.0070.00715.86
7.1.70.0070.00116.36
7.1.60.0090.01117.70
7.1.50.0140.01025.44
7.1.40.0040.01115.75
7.1.30.0070.01015.82
7.1.20.0060.01015.87
7.1.10.0030.01515.70
7.1.00.0060.04119.23
7.0.330.0080.00315.45
7.0.320.0070.00315.37
7.0.310.0050.01015.14
7.0.300.0180.00015.05
7.0.290.0180.00615.29
7.0.280.0100.00715.05
7.0.270.0000.01415.26
7.0.260.0030.00915.16
7.0.250.0080.00315.38
7.0.240.0120.00615.39
7.0.230.0030.01015.44
7.0.220.0030.00915.39
7.0.210.0110.00715.49
7.0.200.0110.00316.20
7.0.190.0080.01715.53
7.0.180.0170.00015.32
7.0.170.0040.00815.31
7.0.160.0030.01015.25
7.0.150.0060.00914.96
7.0.140.0020.03818.54
7.0.130.0000.01215.23
7.0.120.0130.00615.35
7.0.110.0070.01015.11
7.0.100.0240.03317.58
7.0.90.0120.04318.58
7.0.80.0070.04017.66
7.0.70.0100.04117.44
7.0.60.0140.02417.53
7.0.50.0150.04217.79
7.0.40.0080.04316.68
7.0.30.0100.02316.74
7.0.20.0080.04216.65
7.0.10.0050.02816.77
7.0.00.0030.04516.69
5.6.380.0000.01214.16
5.6.370.0110.00313.99
5.6.360.0000.01414.46
5.6.350.0030.01014.26
5.6.340.0000.01514.33
5.6.330.0030.01014.61
5.6.320.0040.00914.05
5.6.310.0030.01314.38
5.6.300.0030.01213.98
5.6.290.0040.01114.40
5.6.280.0080.03817.69
5.6.270.0070.00714.28
5.6.260.0160.00014.13
5.6.250.0150.03817.39
5.6.240.0050.04317.34
5.6.230.0030.02717.29
5.6.220.0090.03717.41
5.6.210.0090.04217.44
5.6.200.0110.02117.50
5.6.190.0100.02517.67
5.6.180.0080.04017.66
5.6.170.0090.04417.67
5.6.160.0110.04117.56
5.6.150.0080.04717.65
5.6.140.0100.03517.54
5.6.130.0120.04217.61
5.6.120.0060.03617.46
5.6.110.0070.04617.68
5.6.100.0080.03517.64
5.6.90.0090.04117.63
5.6.80.0070.04217.34
5.6.70.0080.02717.22
5.6.60.0050.03017.18
5.6.50.0050.04217.27
5.6.40.0030.03017.38
5.6.30.0100.04017.30
5.6.20.0050.04417.31
5.6.10.0060.03617.17
5.6.00.0050.04717.14
5.5.380.0070.03415.55
5.5.370.0080.04315.77
5.5.360.0040.04615.59
5.5.350.0080.04315.79
5.5.340.0120.03515.84
5.5.330.0100.03715.83
5.5.320.0100.04015.85
5.5.310.0080.04315.93
5.5.300.0070.04215.89
5.5.290.0070.04315.75
5.5.280.0020.04916.00
5.5.270.0030.04615.81
5.5.260.0100.02815.86
5.5.250.0070.02715.71
5.5.240.0110.03715.51
5.5.230.0070.04515.58
5.5.220.0130.03315.55
5.5.210.0030.02615.62
5.5.200.0090.03815.46
5.5.190.0030.04415.68
5.5.180.0090.03315.43
5.5.170.0070.00010.77
5.5.160.0100.03815.64
5.5.150.0050.03815.52
5.5.140.0030.04415.48
5.5.130.0030.04415.54
5.5.120.0090.03715.54
5.5.110.0060.03315.53
5.5.100.0080.04015.69
5.5.90.0040.04515.59
5.5.80.0090.03615.57
5.5.70.0080.03815.38
5.5.60.0050.03015.62
5.5.50.0090.04215.47
5.5.40.0030.04715.66
5.5.30.0060.03615.42
5.5.20.0110.03315.59
5.5.10.0070.04015.44
5.5.00.0030.02615.44
5.4.450.0090.03815.15
5.4.440.0100.04015.02
5.4.430.0050.04114.89
5.4.420.0020.04214.90
5.4.410.0070.04115.13
5.4.400.0030.04515.00
5.4.390.0030.04714.75
5.4.380.0080.03714.92
5.4.370.0030.04015.04
5.4.360.0100.03614.99
5.4.350.0000.02814.74
5.4.340.0090.02414.98
5.4.330.0000.01110.82
5.4.320.0100.03014.95
5.4.310.0100.02015.03
5.4.300.0050.03815.04
5.4.290.0050.03614.82
5.4.280.0080.02314.87
5.4.270.0060.02314.83
5.4.260.0070.04014.92
5.4.250.0050.03914.83
5.4.240.0050.04214.82
5.4.230.0080.04014.88
5.4.220.0080.03714.82
5.4.210.0030.04614.93
5.4.200.0080.03114.73
5.4.190.0070.03914.78
5.4.180.0060.04014.82
5.4.170.0070.04214.98
5.4.160.0030.04314.68
5.4.150.0070.04114.72
5.4.140.0030.04213.34
5.4.130.0030.04113.55
5.4.120.0090.03113.45
5.4.110.0010.04113.40
5.4.100.0050.04413.62
5.4.90.0030.03713.57
5.4.80.0080.02513.76
5.4.70.0110.03513.68
5.4.60.0000.02913.62
5.4.50.0050.04013.72
5.4.40.0070.02013.84
5.4.30.0070.04213.63
5.4.20.0070.02513.64
5.4.10.0060.03213.60
5.4.00.0090.03613.09
5.3.290.0080.03812.54
5.3.280.0100.03712.41
5.3.270.0050.03812.57
5.3.260.0020.04012.60
5.3.250.0080.03812.61
5.3.240.0030.02512.40
5.3.230.0050.04012.49
5.3.220.0050.02712.54
5.3.210.0050.04012.41
5.3.200.0140.03312.46
5.3.190.0030.04312.49
5.3.180.0070.03412.54
5.3.170.0080.03412.41
5.3.160.0050.03912.38
5.3.150.0030.03412.39
5.3.140.0090.03612.34
5.3.130.0050.04112.34
5.3.120.0050.04312.52
5.3.110.0070.04012.41
5.3.100.0020.04312.20
5.3.90.0020.04312.23
5.3.80.0030.02612.15
5.3.70.0030.04412.15
5.3.60.0080.03312.24
5.3.50.0060.03812.11
5.3.40.0100.03712.10
5.3.30.0100.03712.16
5.3.20.0030.04211.99
5.3.10.0080.02811.95
5.3.00.0050.02311.92
5.2.170.0040.03011.52
5.2.160.0020.03511.52
5.2.150.0060.03111.52
5.2.140.0030.03511.52
5.2.130.0050.03311.52
5.2.120.0030.03511.52
5.2.110.0070.02811.52
5.2.100.0070.03011.52
5.2.90.0050.02811.52
5.2.80.0080.03211.52
5.2.70.0030.03711.52
5.2.60.0090.02811.52
5.2.50.0030.03711.52
5.2.40.0030.03111.52
5.2.30.0100.02511.52
5.2.20.0050.03211.52
5.2.10.0020.03511.52
5.2.00.0070.03211.52
5.1.60.0050.02611.52
5.1.50.0100.02311.52
5.1.40.0030.02811.52
5.1.30.0020.03311.52
5.1.20.0040.02911.52
5.1.10.0030.02911.52
5.1.00.0050.02811.52
5.0.50.0020.02211.52
5.0.40.0020.02311.52
5.0.30.0010.02411.52
5.0.20.0000.02711.52
5.0.10.0050.01711.52
5.0.00.0000.02511.52
4.4.90.0020.01511.52
4.4.80.0020.02011.52
4.4.70.0050.01811.52
4.4.60.0060.01711.52
4.4.50.0030.01911.52
4.4.40.0020.03011.52
4.4.30.0050.01811.52
4.4.20.0020.02011.52
4.4.10.0000.02211.52
4.4.00.0020.02911.52
4.3.110.0020.01811.52
4.3.100.0020.01011.52
4.3.90.0000.02111.52
4.3.80.0020.03011.52
4.3.70.0030.00811.52
4.3.60.0020.02211.52
4.3.50.0020.02011.52
4.3.40.0020.02711.52
4.3.30.0000.02111.52
4.3.20.0030.01211.52
4.3.10.0000.01711.52
4.3.00.0040.01711.52

preferences:
53.49 ms | 401 KiB | 5 Q