0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

初級試験テスト 1−2

Last updated at Posted at 2020-05-20

I
1 c
2 a
3 d
4 d (c):phpは、CGIサポート以外のサーバが動作するできない
5 b
6 c
7 b
8 c (d):見間違い!
9 d

II
1 c
2 c
3 c(b): 「%.1f」は5より小さいのを切りすで
4 a
5 c(b):ucwordsは最初文字大文字にする,strtolowerはすべて小文字にする
6 d
7 d
8 b(b,e):「-」は変数の中に含められない
9 a,c(c,d):「==」は大小文字を区別する、strcasecmpは区別しない
10 b
11 c(d): 返り値:a++ -> a ; ++a -> a+1; ただ、a = a+1になる

III
1 a,d,e
2 b
3 a
4 e(c): ‘abc’ < ‘xyz’
5 a
6 b
7 ?(b): 「<=>」が 「strcmp」と同じ,例えば: s1<=>s2に関して、s1 > s2 で正の値、s1 < s2 で負の値、s1 = s2で 0 を返す。この大小関係は一般に文字コード順による。
8 c
9 紙欲しい e(c) 計算間違い
10 b

IV
1 d
2 ?(e):a[] = 10; 要素ごとに1ずつ追加する
3 d
4 b(a):配列のメモリ、追加「array_splice」、添字省略、ハッシュ知識不足!
5 a(b) : キーは数字でも可能 1, 2, 4, 3なら 順番はそのままで、キーは1、2、4、3となる
6 b(d):asort, sort, ksort, rsort, arsort, krsort
7 d(b):見間違え
8 c(b):関数 count, explode, implode, unset, in_array, array_key_exist, array_search, array_reverse, array_splice  
9 d
10 d, e

V
1 d
2 a,e(a,b):関数名呼び出す際に大文字小文字区別しない
3 c
4 c(a,c):関数の引数をデフォルトで設定しでも、設定した値を優先する、デフォルト引数は、値を設定しなかった時用
5 a(c):return複数設定することが出来るが、最初の時の設定で値を返す。かつ、returnは一つの値にしか返さない。
6 a
7 ?(a):スコープ変数、有効範囲
8 ?(a):$GLOBAL, $GLOBALSが存在する、前者はグローバル変数を扱う、後者は、グローバル変数を配列に格納する用
9 ?(d) : スコープ変数、有効範囲 : 関数内部globalを使うと、有効範囲を関数外に拡大する
10 ?(e)

VI
1 d (c) : クラスー オブジェクトでインスタンスを作られる;メソッド:操作function; プロパティ:データ変数
2 d (b) : インスタンス new Obj();
3 c
4 c
5 e (a) : try catch : catchブロックに移すと その次のプログラムを実行しなくなる
6 a d (d,e) : public : すべて,protected:継承クラス自身クラス親クラス,private: 自身の身
7 c
8 ? (b):namespace, use. foo\bar\one::two()

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?