3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userdb = array( array( 'uid' => '100', 'name' => 'Sandra Shush', 'pic_square' => 'abc.jpg', 'alias' => "SShush" ), array( 'uid' => '5465', 'name' => 'Stefanie Mcmohn', 'pic_square' => 'Michael.jpg', 'alias' => "Stef" ), array( 'uid' => '40489', 'name' => 'Michael', 'pic_square' => 'xyz.jpg', 'alias' => "Mike" ) ); $search = "Mike"; Foreach($userdb as $key => $arr){ If(preg_grep("/" . $search ."/", $arr)){ $res[] = $userdb[$key]; } } Var_dump($res);

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.120.0140.00624.20
8.4.110.0130.00718.71
8.4.100.0100.00918.84
8.4.90.0090.01022.57
8.4.80.0100.00920.60
8.4.70.0040.00418.20
8.4.60.0130.00818.76
8.4.50.0070.00418.73
8.4.40.0100.01317.88
8.4.30.0080.01119.45
8.4.20.0170.00317.77
8.4.10.0030.00617.88
8.3.250.0120.00719.16
8.3.240.0100.01017.07
8.3.230.0110.00816.76
8.3.220.0040.00818.95
8.3.210.0040.00416.61
8.3.200.0050.00416.71
8.3.190.0090.01118.89
8.3.180.0100.00817.32
8.3.170.0040.01419.11
8.3.160.0130.00616.99
8.3.150.0060.01217.37
8.3.140.0120.00016.91
8.3.130.0040.00418.72
8.3.120.0130.00320.79
8.3.110.0080.00020.94
8.3.100.0090.00024.06
8.3.90.0000.00826.77
8.3.80.0080.00418.68
8.3.70.0040.01116.75
8.3.60.0100.00718.43
8.3.50.0050.00818.18
8.3.40.0080.00818.88
8.3.30.0110.00418.96
8.3.20.0040.00421.89
8.3.10.0040.00421.77
8.3.00.0040.00423.52
8.2.290.0100.00920.46
8.2.280.0110.01018.52
8.2.270.0090.00919.17
8.2.260.0000.00820.64
8.2.250.0030.00617.09
8.2.240.0040.00816.90
8.2.230.0070.00322.58
8.2.220.0000.00937.54
8.2.210.0080.00026.77
8.2.200.0060.00316.63
8.2.190.0090.00616.88
8.2.180.0070.00716.88
8.2.170.0040.01122.96
8.2.160.0150.00322.21
8.2.150.0080.00025.66
8.2.140.0090.00024.66
8.2.130.0030.00621.00
8.2.120.0000.00826.35
8.2.110.0120.01221.09
8.2.100.0070.00417.91
8.2.90.0040.00419.34
8.2.80.0030.00617.97
8.2.70.0030.00517.93
8.2.60.0050.00318.03
8.2.50.0080.00018.22
8.2.40.0000.00818.98
8.2.30.0040.00421.15
8.2.20.0040.00418.07
8.2.10.0000.00718.04
8.2.00.0060.00318.16
8.1.330.0090.00621.66
8.1.320.0050.00317.79
8.1.310.0120.00618.43
8.1.300.0120.00816.37
8.1.290.0090.00018.88
8.1.280.0120.00925.92
8.1.270.0080.00023.87
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0070.00322.67
8.1.230.0090.00317.70
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.50
8.1.190.0030.00617.48
8.1.180.0000.00818.10
8.1.170.0040.00418.69
8.1.160.0040.00418.92
8.1.150.0070.00020.73
8.1.140.0000.00717.65
8.1.130.0030.00619.10
8.1.120.0030.00517.59
8.1.110.0000.00817.61
8.1.100.0000.00717.66
8.1.90.0020.00517.61
8.1.80.0040.00417.67
8.1.70.0030.00617.52
8.1.60.0030.00617.70
8.1.50.0040.00417.58
8.1.40.0000.00917.68
8.1.30.0000.00817.75
8.1.20.0040.00417.85
8.1.10.0000.00817.64
8.1.00.0040.00417.67
8.0.300.0090.00018.77
8.0.290.0000.00716.75
8.0.280.0040.00418.51
8.0.270.0000.00817.22
8.0.260.0040.00417.16
8.0.250.0000.00717.02
8.0.240.0050.00317.11
8.0.230.0000.00717.13
8.0.220.0050.00316.96
8.0.210.0000.00816.94
8.0.200.0060.00317.07
8.0.190.0050.00317.09
8.0.180.0030.00517.05
8.0.170.0040.00417.07
8.0.160.0000.00717.11
8.0.150.0030.00717.01
8.0.140.0000.00716.90
8.0.130.0030.00313.55
8.0.120.0070.00016.90
8.0.110.0040.00417.11
8.0.100.0000.00716.87
8.0.90.0000.00716.90
8.0.80.0070.01317.01
8.0.70.0040.00417.07
8.0.60.0050.00217.11
8.0.50.0050.00317.05
8.0.30.0130.00716.99
8.0.20.0120.00817.47
8.0.10.0040.00417.16
8.0.00.0090.01316.90
7.4.330.0050.00016.81
7.4.320.0030.00316.87
7.4.300.0030.00316.80
7.4.290.0000.00716.63
7.4.280.0070.00016.80
7.4.270.0030.00316.70
7.4.260.0000.01016.67
7.4.250.0080.00016.57
7.4.240.0040.00416.71
7.4.230.0000.00716.53
7.4.220.0040.00416.63
7.4.210.0100.00516.72
7.4.200.0000.00716.80
7.4.160.0100.00716.84
7.4.140.0090.01217.86
7.4.130.0130.00616.62
7.4.120.0110.00816.77
7.4.110.0030.01316.72
7.4.100.0110.00616.74
7.4.90.0070.01016.75
7.4.80.0110.00919.39
7.4.70.0110.00616.82
7.4.60.0060.01016.71
7.4.50.0150.00016.67
7.4.40.0090.00716.75
7.4.00.0100.00315.13
7.3.330.0030.00313.16
7.3.320.0050.00013.31
7.3.310.0030.00316.29
7.3.300.0000.00716.41
7.3.290.0030.00316.33
7.3.280.0080.01016.48
7.3.260.0140.00716.61
7.3.240.0110.00616.65
7.3.230.0110.00616.49
7.3.210.0070.01016.65
7.3.200.0040.01216.59
7.3.190.0100.00716.43
7.3.180.0100.01016.93
7.3.170.0090.00616.88
7.3.160.0030.01316.82
7.3.10.0100.00316.64
7.3.00.0000.01016.89
7.2.330.0060.01216.79
7.2.320.0070.01116.64
7.2.310.0080.00816.60
7.2.300.0120.00816.57
7.2.290.0030.01416.63
7.2.130.0040.00716.97
7.2.120.0040.00816.79
7.2.110.0070.00416.95
7.2.100.0080.00317.05
7.2.90.0060.00317.21
7.2.80.0040.00717.21
7.2.70.0040.01116.99
7.2.60.0100.00316.84
7.2.50.0060.00616.93
7.2.40.0200.01017.79
7.2.30.0340.01017.69
7.2.20.0290.00917.65
7.2.10.0270.01117.72
7.2.00.0330.01117.46
7.1.250.0110.00416.15
7.1.200.0030.00615.80
7.1.160.0540.01017.11
7.1.150.0690.01017.26
7.1.140.0590.01217.07
7.1.130.0440.01016.95
7.1.120.0530.01316.79
7.1.110.1520.01516.17
7.1.100.0420.00816.27
7.1.90.0510.01116.73
7.1.80.0560.01416.75
7.1.70.0870.01215.65
7.1.60.0820.01833.45
7.1.50.0800.01833.22
7.1.40.0670.00932.95
7.1.30.0630.01432.84
7.1.20.0890.02133.08
7.1.10.0420.00614.89
7.1.00.0620.01415.07

preferences:
28.57 ms | 403 KiB | 5 Q