3v4l.org

run code in 300+ PHP versions simultaneously
<?php //https://www.php.net/manual/en/language.types.type-juggling.php $i = 0; switch($i) { case 'test': echo "1: $i\n"; break 1; } switch((string) $i) { case 'test': echo "2: $i\n"; break 1; } //weird :/ echo '3: ' . ($i == 'test' ? 'true': 'false') . "\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.20.0140.00719.63
8.4.10.0060.00317.59
8.3.150.0090.00918.38
8.3.140.0080.00017.07
8.3.130.0000.00818.37
8.3.120.0040.00418.89
8.3.110.0140.00720.94
8.3.100.0060.00324.06
8.3.90.0090.00626.77
8.3.80.0030.00618.31
8.3.70.0070.01118.30
8.3.60.0080.01218.27
8.3.50.0110.00317.89
8.3.40.0110.00418.89
8.3.30.0060.00918.58
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.260.0100.00616.60
8.2.250.0040.00418.47
8.2.240.0030.01320.66
8.2.230.0030.00622.58
8.2.220.0000.01037.54
8.2.210.0070.00726.77
8.2.200.0060.00316.25
8.2.190.0220.00016.58
8.2.180.0100.00325.92
8.2.170.0090.00618.87
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.98
8.2.110.0080.00320.93
8.2.100.0070.00417.78
8.2.90.0040.00417.63
8.2.80.0000.00818.78
8.2.70.0040.00417.63
8.2.60.0000.00817.38
8.2.50.0040.00417.55
8.2.40.0070.00019.30
8.2.30.0040.00419.11
8.2.20.0070.00019.31
8.2.10.0060.00317.68
8.2.00.0040.00419.29
8.1.310.0000.00718.55
8.1.300.0030.00619.59
8.1.290.0040.00430.84
8.1.280.0130.00725.92
8.1.270.0000.00823.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00719.28
8.1.230.0040.00722.62
8.1.220.0070.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0050.00317.13
8.1.180.0060.00318.10
8.1.170.0000.00918.65
8.1.160.0030.00618.82
8.1.150.0060.00318.55
8.1.140.0000.00717.49
8.1.130.0000.00717.50
8.1.120.0030.00317.46
8.1.110.0030.00617.48
8.1.100.0020.00717.40
8.1.90.0100.00217.42
8.1.80.0080.00417.33
8.1.70.0020.00917.45
8.1.60.0060.00617.53
8.1.50.0040.00417.40
8.1.40.0040.00517.45
8.1.30.0020.00817.65
8.1.20.0110.00417.62
8.1.10.0120.00317.45
8.1.00.0090.00617.44
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0030.00316.82
8.0.260.0040.00416.75
8.0.250.0030.00316.95
8.0.240.0030.00316.82
8.0.230.0060.00416.88
8.0.220.0050.00616.74
8.0.210.0070.00316.87
8.0.200.0060.00416.92
8.0.190.0090.00216.87
8.0.180.0070.00616.80
8.0.170.0050.00816.91
8.0.160.0040.00816.78
8.0.150.0080.00616.82
8.0.140.0130.00216.76
8.0.130.0080.00615.67
8.0.120.0120.00515.68
8.0.110.0130.00315.66
8.0.100.0080.00815.62
8.0.90.0140.00215.56
8.0.80.0110.00515.66
8.0.70.0110.00615.65
8.0.60.0110.00615.64
8.0.50.0130.00415.56
8.0.30.0140.00315.66
8.0.20.0140.00315.70
8.0.10.0140.00315.76
8.0.00.0100.00415.83
7.4.330.0050.00015.55
7.4.320.0000.00616.36
7.4.300.0120.00016.53
7.4.290.0080.00316.45
7.4.280.0040.00916.49
7.4.270.0090.00516.53
7.4.260.0120.00215.40
7.4.250.0160.00315.35
7.4.240.0130.00415.45
7.4.230.0120.00215.41
7.4.220.0130.00415.41
7.4.210.0120.00315.44
7.4.200.0130.00215.32
7.4.190.0080.00715.46
7.4.180.0120.00415.51
7.4.160.0110.00415.50
7.4.150.0090.00715.42
7.4.140.0090.00715.39
7.4.130.0140.00315.32
7.4.120.0110.00415.31
7.4.110.0120.00415.33
7.4.100.0160.00115.33
7.4.90.0110.00315.34
7.4.80.0130.00115.28
7.4.70.0120.00315.27
7.4.60.0100.00515.32
7.4.50.0070.00815.28
7.4.40.0120.00315.28
7.4.30.0090.00615.35
7.4.20.0080.00415.39
7.4.10.0100.00415.43
7.4.00.0080.00315.38
7.3.330.0110.00316.24
7.3.320.0120.00415.22
7.3.310.0120.00415.14
7.3.300.0140.00115.20
7.3.290.0110.00415.33
7.3.280.0110.00615.26
7.3.270.0100.00715.24
7.3.260.0090.00715.19
7.3.250.0130.00415.24
7.3.240.0140.00215.19
7.3.230.0140.00315.20
7.3.220.0110.00414.99
7.3.210.0160.00215.06
7.3.200.0140.00315.09
7.3.190.0120.00315.11
7.3.180.0130.00215.18
7.3.170.0120.00415.16
7.3.160.0090.00615.15
7.3.150.0090.00615.01
7.3.140.0110.00515.10
7.3.130.0140.00215.04
7.3.120.0110.00415.15
7.3.110.0120.00415.03
7.3.100.0110.00415.13
7.3.90.0100.00615.44
7.3.80.0160.00015.17
7.3.70.0130.00315.31
7.3.60.0110.00415.29
7.3.50.0130.00215.23
7.3.40.0130.00215.27
7.3.30.0090.00715.30
7.3.20.0110.00516.56
7.3.10.0130.00616.49
7.3.00.0140.00316.43
7.2.340.0110.00416.34
7.2.330.0080.00616.34
7.2.320.0050.00916.38
7.2.310.0070.00716.28
7.2.300.0100.00516.39
7.2.290.0080.00616.30
7.2.280.0100.00516.33
7.2.270.0070.00716.21
7.2.260.0070.00716.39
7.2.250.0060.00816.17
7.2.240.0140.00016.25
7.2.230.0140.00016.46
7.2.220.0050.00916.37
7.2.210.0100.00316.38
7.2.200.0040.01216.64
7.2.190.0130.00316.39
7.2.180.0100.00616.61
7.2.170.0130.00316.55
7.2.160.0060.01116.44
7.2.150.0130.00418.38
7.2.140.0080.00918.55
7.2.130.0150.00018.63
7.2.120.0110.00518.51
7.2.110.0160.00018.33
7.2.100.0090.00818.37
7.2.90.0140.00418.55
7.2.80.0120.00418.25
7.2.70.0120.00418.19
7.2.60.0150.00318.24
7.2.50.0080.00818.45
7.2.40.0140.00318.36
7.2.30.0150.00318.54
7.2.20.0110.00718.56
7.2.10.0120.00418.48
7.2.00.0050.01318.38
7.1.330.0100.00517.48
7.1.320.0100.00517.21
7.1.310.0150.00017.26
7.1.300.0160.00017.09
7.1.290.0130.00517.29
7.1.280.0130.00317.40
7.1.270.0100.00617.21
7.1.260.0140.00217.20
7.1.250.0110.00617.25
7.1.240.0090.00717.20
7.1.230.0160.00017.07
7.1.220.0140.00217.35
7.1.210.0090.00717.35
7.1.200.0090.00717.24
7.1.190.0120.00617.36
7.1.180.0110.00517.11
7.1.170.0160.00017.30
7.1.160.0080.00817.32
7.1.150.0120.00517.28
7.1.140.0130.00317.28
7.1.130.0230.00017.19
7.1.120.0150.00017.27
7.1.110.0090.00517.16
7.1.100.0120.00617.36
7.1.90.0130.00317.26
7.1.80.0060.01017.24
7.1.70.0120.00317.03
7.1.60.0120.00617.33
7.1.50.0150.00017.29
7.1.40.0090.00517.23
7.1.30.0150.00217.38
7.1.20.0100.00517.16
7.1.10.0070.00817.12
7.1.00.0100.00416.98
7.0.330.0080.00516.95
7.0.320.0170.00017.07
7.0.310.0090.00517.09
7.0.300.0170.00017.18
7.0.290.0100.00317.12
7.0.280.0160.00817.05
7.0.270.0110.00317.09
7.0.260.0100.00317.13
7.0.250.0110.00317.07
7.0.240.0100.00316.88
7.0.230.0070.00717.18
7.0.220.0080.00416.89
7.0.210.0140.00017.03
7.0.200.0060.00616.90
7.0.190.0110.00317.14
7.0.180.0160.00316.80
7.0.170.0100.00317.16
7.0.160.0150.00016.94
7.0.150.0110.00416.81
7.0.140.0100.00516.95
7.0.130.0090.00417.10
7.0.120.0070.00716.76
7.0.110.0110.00617.03
7.0.100.0150.00016.94
7.0.90.0100.00516.93
7.0.80.0080.00516.82
7.0.70.0140.00016.95
7.0.60.0140.00017.14
7.0.50.0140.00017.01
7.0.40.0120.00016.85
7.0.30.0150.00317.13
7.0.20.0060.00617.05
7.0.10.0090.00416.89
7.0.00.0080.00516.97
5.6.400.0070.00715.85
5.6.390.0090.00415.79
5.6.380.0090.00415.66
5.6.370.0100.00315.58
5.6.360.0060.00715.77
5.6.350.0160.00015.85
5.6.340.0110.00315.60
5.6.330.0040.00815.75
5.6.320.0060.00615.78
5.6.310.0070.00715.81
5.6.300.0080.00515.72
5.6.290.0130.00015.89
5.6.280.0060.00615.84
5.6.270.0070.00715.86
5.6.260.0060.00615.80
5.6.250.0090.00315.64
5.6.240.0090.00415.78
5.6.230.0080.00415.75
5.6.220.0080.00415.73
5.6.210.0160.00015.91
5.6.200.0130.00016.05
5.6.190.0080.00415.96
5.6.180.0120.00015.92
5.6.170.0090.00415.72
5.6.160.0060.00615.91
5.6.150.0130.00015.91
5.6.140.0060.00615.88
5.6.130.0130.00015.61
5.6.120.0090.00415.76
5.6.110.0060.00615.70
5.6.100.0130.00015.84
5.6.90.0080.00515.67
5.6.80.0060.00615.76
5.6.70.0080.00415.92
5.6.60.0080.00415.87
5.6.50.0120.00015.58
5.6.40.0040.00815.80
5.6.30.0120.00015.89
5.6.20.0120.00015.63
5.6.10.0130.00015.83
5.6.00.0060.00615.70
5.5.380.0080.00415.73
5.5.370.0080.00415.88
5.5.360.0060.00615.76
5.5.350.0030.01015.80
5.5.340.0030.01015.65
5.5.330.0060.00615.86
5.5.320.0130.00015.83
5.5.310.0070.00715.82
5.5.300.0090.00415.70
5.5.290.0040.00915.84
5.5.280.0080.00515.84
5.5.270.0050.00815.85
5.5.260.0070.00715.81
5.5.250.0130.00015.80
5.5.240.0090.00415.98
5.5.230.0060.00615.86
5.5.220.0130.00015.52
5.5.210.0060.00615.61
5.5.200.0080.00415.72
5.5.190.0130.00015.39
5.5.180.0030.00915.73
5.5.170.0080.00515.47
5.5.160.0120.00015.75
5.5.150.0080.00415.57
5.5.140.0080.00415.61
5.5.130.0100.00315.63
5.5.120.0120.00015.31
5.5.110.0060.00615.50
5.5.100.0090.00415.53
5.5.90.0080.00415.94
5.5.80.0120.00015.94
5.5.70.0130.00015.72
5.5.60.0080.00515.87
5.5.50.0060.00615.50
5.5.40.0060.00615.74
5.5.30.0060.00615.89
5.5.20.0050.00815.95
5.5.10.0090.00315.60
5.5.00.0100.00215.58
5.4.450.0100.00012.43
5.4.440.0080.00312.42
5.4.430.0070.00312.47
5.4.420.0080.00312.52
5.4.410.0050.00512.50
5.4.400.0070.00412.56
5.4.390.0060.00412.52
5.4.380.0100.00012.53
5.4.370.0080.00312.70
5.4.360.0100.00012.70
5.4.350.0080.00312.54
5.4.340.0000.01012.70
5.4.330.0100.00012.73
5.4.320.0070.00312.62
5.4.310.0060.00412.77
5.4.300.0060.00412.62
5.4.290.0100.00012.41
5.4.280.0100.00012.79
5.4.270.0080.00312.60
5.4.260.0050.00512.70
5.4.250.0100.00012.56
5.4.240.0080.00312.56
5.4.230.0080.00312.45
5.4.220.0100.00012.31
5.4.210.0090.00212.38
5.4.200.0050.00512.25
5.4.190.0100.00012.26
5.4.180.0070.00512.34
5.4.170.0060.00412.28
5.4.160.0100.00012.43
5.4.150.0000.01112.25
5.4.140.0090.00212.70
5.4.130.0110.00012.49
5.4.120.0070.00312.32
5.4.110.0090.00312.43
5.4.100.0090.00312.63
5.4.90.0090.00312.49
5.4.80.0120.00012.70
5.4.70.0080.00412.55
5.4.60.0080.00212.34
5.4.50.0080.00312.43
5.4.40.0080.00412.40
5.4.30.0070.00312.62
5.4.20.0040.00712.39
5.4.10.0040.00812.62
5.4.00.0070.00212.50
5.3.290.0050.00512.86
5.3.280.0100.00012.71
5.3.270.0070.00513.06
5.3.260.0040.00812.87
5.3.250.0090.00313.07
5.3.240.0110.00012.95
5.3.230.0060.00412.71
5.3.220.0120.00012.59
5.3.210.0090.00312.62
5.3.200.0080.00412.89
5.3.190.0120.00012.91
5.3.180.0000.01312.90
5.3.170.0100.00212.90
5.3.160.0130.00012.78
5.3.150.0070.00412.77
5.3.140.0090.00213.00
5.3.130.0060.00612.95
5.3.120.0110.00012.92
5.3.110.0070.00412.73
5.3.100.0110.00012.99
5.3.90.0060.00612.82
5.3.80.0080.00412.64
5.3.70.0080.00312.78
5.3.60.0030.00612.89
5.3.50.0100.00012.65
5.3.40.0100.00012.60
5.3.30.0070.00413.02
5.3.20.0070.00412.76
5.3.10.0080.00312.43
5.3.00.0050.00512.78
5.2.170.0030.00611.97
5.2.160.0070.00211.88
5.2.150.0070.00211.93
5.2.140.0080.00011.80
5.2.130.0050.00511.95
5.2.120.0050.00512.06
5.2.110.0100.00012.02
5.2.100.0030.00912.02
5.2.90.0090.00011.98
5.2.80.0050.00511.65
5.2.70.0040.00711.85
5.2.60.0080.00211.55
5.2.50.0050.00511.72
5.2.40.0030.00811.98
5.2.30.0050.00511.86
5.2.20.0090.00011.57
5.2.10.0050.00511.79
5.2.00.0070.00211.70
5.1.60.0090.00010.84
5.1.50.0030.00610.83
5.1.40.0040.00410.95
5.1.30.0060.00311.10
5.1.20.0080.00010.88
5.1.10.0090.00011.18
5.1.00.0050.00210.99
5.0.50.0040.0029.92
5.0.40.0070.0029.92
5.0.30.0040.0049.83
5.0.20.0050.0039.91
5.0.10.0030.0039.60
5.0.00.0040.0049.79
4.4.90.0000.0049.60
4.4.80.0050.0009.60
4.4.70.0000.0049.60
4.4.60.0000.0049.60
4.4.50.0040.0009.60
4.4.40.0030.0009.60
4.4.30.0040.0009.60
4.4.20.0000.0049.60
4.4.10.0020.0029.60
4.4.00.0000.0059.60
4.3.110.0030.0009.60
4.3.100.0000.0049.60
4.3.90.0000.0049.60
4.3.80.0020.0009.60
4.3.70.0040.0009.60
4.3.60.0040.0009.60
4.3.50.0040.0009.60
4.3.40.0000.0049.60
4.3.30.0000.0039.60
4.3.20.0030.0009.60
4.3.10.0020.0029.60
4.3.00.0000.0039.60

preferences:
77.87 ms | 403 KiB | 5 Q