3v4l.org

run code in 300+ PHP versions simultaneously
<?php /******************************************************************* * PHP Challenge 2015 ******************************************************************* * Why leave all the fun to the XSS crowd? * * Do you know PHP? * And are you up to date with all its latest peculiarities? * * Are you sure? * * If you believe you do then solve this challenge and create an * input that will make the following code believe you are the ADMIN. * Becoming any other user is not good enough, but a first step. * * Attention this code is installed on a Mac OS X 10.9 system * that is running PHP 5.4.30 !!! * * TIPS: OS X is mentioned because OS X never runs latest PHP * Challenge will not work with latest PHP * Also challenge will only work on 64bit systems * To solve challenge you need to combine what a normal * attacker would do when he sees this code with knowledge * about latest known PHP quirks * And you cannot bruteforce the admin password directly. * To give you an idea - first half is: * orewgfpeowöfgphewoöfeiuwgöpuerhjwfiuvuger * * If you know the answer please submit it to info@sektioneins.de ********************************************************************/ $users = array( "0:9b5c3d2b64b8f74e56edec71462bd97a" , "1:4eb5fb1501102508a86971773849d266", "2:facabd94d57fc9f1e655ef9ce891e86e", "3:ce3924f011fe323df3a6a95222b0c909", "4:7f6618422e6a7ca2e939bd83abde402c", "5:06e2b745f3124f7d670f78eabaa94809", "6:8e39a6e40900bb0824a8e150c0d0d59f", "7:d035e1a80bbb377ce1edce42728849f2", "8:0927d64a71a9d0078c274fc5f4f10821", "9:e2e23d64a642ee82c7a270c6c76df142", "10:70298593dd7ada576aff61b6750b9118" ); $valid_user = false; $input = array("-5","hund"); //$input[0]=5; $input[1] = md5($input[1]); foreach ($users as $user) { $user = explode(":", $user); if ($input === $user) { $uid = $input[0] + 0; echo $input[0]; echo $uid; $valid_user = true; } } if (!$valid_user) { die("not a valid user\n"); } if ($uid == 0) { echo "Hello Admin How can I serve you today?\n"; echo "SECRETS ....\n"; } else { echo "Welcome back user\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.3.60.0100.01016.50
8.3.50.0190.00722.04
8.3.40.0090.00618.71
8.3.30.0140.00019.04
8.3.20.0050.00320.34
8.3.10.0070.00021.89
8.3.00.0030.00619.51
8.2.180.0090.00616.75
8.2.170.0120.00419.08
8.2.160.0030.01722.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00417.63
8.2.110.0030.00621.18
8.2.100.0040.00717.85
8.2.90.0030.00618.22
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0000.00819.85
8.2.30.0030.00518.14
8.2.20.0050.00217.82
8.2.10.0050.00318.17
8.2.00.0000.00818.00
8.1.280.0140.00725.92
8.1.270.0090.00920.16
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.93
8.1.230.0070.00420.88
8.1.220.0030.00517.76
8.1.210.0000.00820.41
8.1.200.0040.00417.35
8.1.190.0030.00517.35
8.1.180.0000.00818.10
8.1.170.0070.00418.36
8.1.160.0030.00521.93
8.1.150.0040.00418.90
8.1.140.0030.00517.50
8.1.130.0000.00717.68
8.1.120.0000.00717.49
8.1.110.0050.00217.42
8.1.100.0040.00417.31
8.1.90.0040.00417.34
8.1.80.0040.00317.43
8.1.70.0000.00717.47
8.1.60.0060.00317.44
8.1.50.0050.00317.55
8.1.40.0030.00617.46
8.1.30.0080.00017.56
8.1.20.0040.00417.59
8.1.10.0050.00317.59
8.1.00.0030.00517.40
8.0.300.0080.00019.99
8.0.290.0000.00916.58
8.0.280.0030.00318.45
8.0.270.0040.00417.13
8.0.260.0060.00317.34
8.0.250.0070.00017.05
8.0.240.0030.00316.98
8.0.230.0030.00317.06
8.0.220.0070.00016.95
8.0.210.0000.00716.94
8.0.200.0000.00716.88
8.0.190.0000.00816.92
8.0.180.0000.00716.96
8.0.170.0030.00516.89
8.0.160.0000.00716.89
8.0.150.0040.00416.92
8.0.140.0040.00416.89
8.0.130.0060.00013.34
8.0.120.0080.00016.81
8.0.110.0050.00216.98
8.0.100.0030.00316.79
8.0.90.0070.00016.93
8.0.80.0150.00017.01
8.0.70.0040.00416.95
8.0.60.0040.00416.89
8.0.50.0030.00416.82
8.0.30.0120.00517.08
8.0.20.0120.00717.40
8.0.10.0020.00517.05
8.0.00.0100.00916.67
7.4.330.0050.00015.04
7.4.320.0030.00316.51
7.4.300.0000.00716.61
7.4.290.0030.00316.54
7.4.280.0040.00416.64
7.4.270.0070.00016.52
7.4.260.0030.00316.50
7.4.250.0000.00816.50
7.4.240.0040.00316.56
7.4.230.0030.00316.59
7.4.220.0110.00716.71
7.4.210.0080.01216.51
7.4.200.0030.00316.42
7.4.160.0090.01516.42
7.4.150.0220.00317.40
7.4.140.0100.01017.86
7.4.130.0100.00816.75
7.4.120.0080.01216.57
7.4.110.0030.01616.59
7.4.100.0150.00616.59
7.4.90.0070.01016.31
7.4.80.0080.01319.39
7.4.70.0050.01416.59
7.4.60.0100.00616.48
7.4.50.0040.00016.49
7.4.40.0110.00716.29
7.4.30.0120.00616.51
7.4.00.0060.00614.88
7.3.330.0030.00313.38
7.3.320.0060.00013.15
7.3.310.0070.00016.25
7.3.300.0070.00016.39
7.3.290.0030.00316.39
7.3.280.0060.01316.41
7.3.270.0080.00817.40
7.3.260.0100.00716.30
7.3.250.0100.00716.46
7.3.240.0110.00616.50
7.3.230.0090.01016.48
7.3.210.0040.01216.48
7.3.200.0100.00719.39
7.3.190.0060.01016.36
7.3.180.0030.01416.43
7.3.170.0030.01416.45
7.3.160.0120.00616.52
7.3.10.0060.00916.65
7.3.00.0060.00616.52
7.2.330.0070.01116.75
7.2.320.0090.01416.66
7.2.310.0060.01116.68
7.2.300.0120.00916.53
7.2.290.0070.01116.72
7.2.130.0070.01116.46
7.2.120.0180.00016.52
7.2.110.0000.01616.66
7.2.100.0070.01116.69
7.2.90.0040.00716.75
7.2.80.0060.00616.82
7.2.70.0040.00816.95
7.2.60.0030.00916.76
7.2.50.0030.00916.95
7.2.40.0150.00616.74
7.2.30.0120.00016.70
7.2.20.0090.00916.73
7.2.10.0080.00317.02
7.2.00.0030.00918.07
7.1.250.0060.00915.35
7.1.100.0220.01017.23
7.1.70.0000.01017.34
7.1.60.0100.01319.59
7.1.50.0110.01416.98
7.1.00.0070.07322.29
7.0.200.0120.00016.92
7.0.60.0030.07720.04
7.0.50.0070.08317.67
7.0.40.0070.04320.09
7.0.30.0430.04320.28
7.0.20.0330.07720.21
7.0.10.0130.05720.16
7.0.00.0130.07720.18
5.6.280.0100.06720.93
5.6.210.0130.07720.52
5.6.200.0030.09018.19
5.6.190.0100.05720.41
5.6.180.0300.05320.35
5.6.170.0370.06720.50
5.6.160.0070.08320.41
5.6.150.0130.04718.21
5.6.140.0070.08318.09
5.6.130.0000.04318.20
5.6.120.0070.04720.98
5.6.110.0070.07320.98
5.6.100.0170.07721.13
5.6.90.0100.07321.10
5.6.80.0070.08320.53
5.6.70.3630.03720.37
5.5.350.0070.08720.43
5.5.340.0030.08717.96
5.5.330.0070.04720.07
5.5.320.0270.08020.51
5.5.310.0270.08320.21
5.5.300.0070.04317.95
5.5.290.0030.08317.92
5.5.280.0070.09020.86
5.5.270.0200.07020.88
5.5.260.0070.03720.72
5.5.250.0130.07320.66
5.5.240.0030.08720.23
5.4.450.0930.04319.63
5.4.440.1070.05319.26
5.4.430.0270.04319.54
5.4.420.0170.05319.14
5.4.410.0230.05019.41
5.4.400.0130.05318.85
5.4.390.0300.04319.19
5.4.380.0170.05718.89
5.4.370.0270.04719.22
5.4.360.0200.05318.84
5.4.350.0200.05018.84
5.4.340.0200.05319.20
5.4.320.0170.05719.14
5.4.310.0230.05719.10
5.4.300.0170.05718.83
5.4.290.0070.06018.98
5.4.280.0230.05019.19
5.4.270.0200.05318.96
5.4.260.0170.05019.18
5.4.250.0200.04719.07
5.4.240.0200.04718.83
5.4.230.0230.04719.20
5.4.220.0170.05319.26
5.4.210.0100.05718.98
5.4.200.0230.04016.76
5.4.190.0330.06319.03
5.4.180.0370.05319.12
5.4.170.0300.06019.03
5.4.160.0230.05019.13
5.4.150.0170.05718.88
5.4.140.0200.05016.43
5.4.130.0230.04316.57
5.4.120.0300.03716.52
5.4.110.0170.05316.21
5.4.100.0570.05716.16
5.4.90.0230.04716.33
5.4.80.0200.04316.40
5.4.70.0170.05016.48
5.4.60.0230.05016.47
5.4.50.0230.05716.14
5.4.40.0300.04716.34
5.4.30.0270.04716.07
5.4.20.0270.04316.16
5.4.10.0200.04316.48
5.4.00.0170.04715.87
5.3.290.0200.07314.46
5.3.280.0230.06314.47
5.3.270.0300.04314.54
5.3.260.0170.05714.46
5.3.250.0100.06014.44
5.3.240.0230.04314.47
5.3.230.0200.04714.50
5.3.220.0170.04714.42
5.3.210.0100.06014.50
5.3.200.0170.04714.50
5.3.190.0130.05714.43
5.3.180.0300.04014.55
5.3.170.0200.05014.49
5.3.160.0100.05314.54
5.3.150.0170.05014.57
5.3.140.0200.04314.48
5.3.130.0130.05314.57
5.3.120.0100.06014.39
5.3.110.0170.05714.41
5.3.100.0230.04713.87
5.3.90.0200.04313.90
5.3.80.0230.06013.81
5.3.70.0170.05013.95
5.3.60.0200.04713.83
5.3.50.0170.04013.81
5.3.40.0100.04713.89
5.3.30.0070.05013.76
5.3.20.0170.04713.72
5.3.10.0130.05013.52
5.3.00.0070.05713.57
5.2.170.0070.04711.14
5.2.160.0070.04311.05
5.2.150.0100.04711.25
5.2.140.0130.04311.05
5.2.130.0030.04711.01
5.2.120.0100.05010.97
5.2.110.0100.04011.04
5.2.100.0170.03311.18
5.2.90.0170.03311.02
5.2.80.0100.04311.02
5.2.70.0130.05310.94
5.2.60.0170.03310.95
5.2.50.0130.04011.11
5.2.40.0030.04710.95
5.2.30.0100.04011.02
5.2.20.0100.03710.95
5.2.10.0130.03710.77
5.2.00.0230.04010.61
5.1.60.0130.03010.07
5.1.50.0070.0439.91
5.1.40.0070.0379.91
5.1.30.0000.04310.32
5.1.20.0130.03310.38
5.1.10.0100.03310.02
5.1.00.0100.0339.98
5.0.50.0070.0278.55
5.0.40.0070.0278.41
5.0.30.0070.0438.17
5.0.20.0030.0308.36
5.0.10.0100.0238.06
5.0.00.0030.0438.09
4.4.90.0000.0275.84
4.4.80.0070.0205.80
4.4.70.0030.0235.79
4.4.60.0070.0205.76
4.4.50.0100.0175.77
4.4.40.0100.0305.80
4.4.30.0070.0205.77
4.4.20.0100.0205.80
4.4.10.0070.0205.93
4.4.00.0030.0435.84
4.3.110.0070.0205.69
4.3.100.0070.0205.68
4.3.90.0070.0205.78
4.3.80.0030.0375.82
4.3.70.0130.0205.68
4.3.60.0070.0235.65
4.3.50.0070.0205.66
4.3.40.0070.0335.70
4.3.30.0030.0235.41
4.3.20.0030.0235.41
4.3.10.0030.0205.41
4.3.00.0100.0237.41

preferences:
72.85 ms | 401 KiB | 5 Q